home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / c / amiga-c-jan00 / amiga-cjan2000.guide (.txt) < prev    next >
Amigaguide Document  |  2000-02-28  |  182KB  |  3,671 lines

  1. @database Amiga_C_List.guide
  2. @width 70
  3. @node "Introduction" "Introduction"
  4. @wordwrap
  5.                          Amiga-C Mailing List Guide
  6.                          ==========================
  7. This guide is intended as an easy reference to the Amiga C mailing list.
  8. It contains messages posted to the Amiga C mailing list during the month shown on the main page.
  9. To subscribe to the Amiga C mailing list, search for amiga-c at Onelist.
  10. http://www.onelist.com
  11. This AmigaGuide was created using GuideMaker.rexx 
  12.  Roger Light 1999
  13. Comments should be sent to Tim Hanson at msinister@connectfree.co.uk
  14. @endnode
  15. @node "Main" "Amiga C Mailing List Guide"
  16.                     @{b}Amiga C Mailing List Guide
  17.                     ==========================@{ub}
  18.                           Jan 2000
  19. @{" Introduction " link Introduction } Introduction to the guide.
  20. @{" Search " SYSTEM "RUN <>NIL: Searchguide FINAME"} Search this file (requres SearchGuide)
  21.  ------------------------------------------------------------------- 
  22. @{" Re: lowlevel.library and 060 " Link "Mail_0"}      Mike Carter
  23. @{" Re: Check your sources for Y2K bugs! " Link "Mail_1"}      Allan Odgaard
  24. @{" LoadSeg() " Link "Mail_2"}      Charles Barr
  25. @{" Re: Check your sources for Y2K bugs! " Link "Mail_3"}      Andrew Bell
  26. @{" SAS/C SE Configuration problem " Link "Mail_4"}      jsteic1957@aol.com
  27. @{" Re: SAS/C SE Configuration problem " Link "Mail_5"}      meyersfamily
  28. @{" A virtual delete operator? " Link "Mail_6"}      Allan Odgaard
  29. @{" Re: LoadSeg() " Link "Mail_7"}      Colin Wenzel
  30. @{" SAS/C Date Problem " Link "Mail_8"}      Bablos
  31. @{" AmigaOS 3.5 & ReadPixelLine8() " Link "Mail_9"}      Niels de Koning
  32. @{" Register usage for doubles " Link "Mail_10"}      ROBERT MEYERS
  33. @{" FPrintf() equivalent? " Link "Mail_11"}      W1bBle
  34. @{" Re: FPrintf() equivalent? " Link "Mail_12"}      Oliver Roberts
  35. @{" Re: A virtual delete operator? " Link "Mail_13"}      "Nathan J. Young"
  36. @{" BOOPSI Prop Gadgets " Link "Mail_14"}      "Alastair M. Robinson"
  37. @{" Re: A virtual delete operator? " Link "Mail_15"}      Allan Odgaard
  38. @{" off the topic. " Link "Mail_16"}      Dr Brain Damage
  39. @{" Quick Q about Palette gads " Link "Mail_17"}      Daithi O'Cuinn
  40. @{" Re: Quick Q about Palette gads " Link "Mail_18"}      Laura Vance
  41. @{" Problems with active object... " Link "Mail_19"}      "Andrzej J. Debicki"
  42. @{" Re: Problems with active object... " Link "Mail_20"}      Allan Odgaard
  43. @{" Windows " Link "Mail_21"}      Steffen
  44. @{" Re: Quick Q about Palette gads " Link "Mail_22"}      Daithi O'Cuinn
  45. @{" Re: Re: Quick Q about Palette gads " Link "Mail_23"}      Gregory Roberts II
  46. @{" The future of StormAmiga.lib!!! " Link "Mail_24"}      Allan Odgaard
  47. @{" Re: Re: Quick Q about Palette gads " Link "Mail_25"}      David McMinn
  48. @{" Tasks " Link "Mail_26"}      Andrew Bell
  49. @{" Re: Tasks " Link "Mail_27"}      Laura Vance
  50. @{" Re: Tasks " Link "Mail_28"}      Andrew Bell
  51. @{" Re: Re: Tasks " Link "Mail_29"}      Duane McDonnell
  52. @{" Re: Re: Problems with active object... " Link "Mail_30"}      "Andrzej J. Debicki"
  53. @{" Re: Re: Tasks " Link "Mail_31"}      Duane McDonnell
  54. @{" Re: Re: Tasks " Link "Mail_32"}      Nicholas Clarke
  55. @{" Re: Re: Tasks " Link "Mail_33"}      Duane McDonnell
  56. @{" Re: Tasks " Link "Mail_34"}      Andrew Bell
  57. @{" Re: Quick Q about Palette gads " Link "Mail_35"}      Bob Lanham
  58. @{" Re: Tasks " Link "Mail_36"}      Duane McDonnell
  59. @{" Re: Windows " Link "Mail_37"}      Tak Tang
  60. @{" Re: Re: Tasks " Link "Mail_38"}      Duane McDonnell
  61. @{" Re: Quick Q about Palette gads " Link "Mail_39"}      Daithi O'Cuinn
  62. @{" Re: Windows " Link "Mail_40"}      Laura Vance
  63. @{" Re: Tasks " Link "Mail_41"}      Laura Vance
  64. @{" Re: Re: Tasks " Link "Mail_42"}      Nicholas Clarke
  65. @{" Re: Windows " Link "Mail_43"}      Steffen
  66. @{" Re: Windows " Link "Mail_44"}      Steffen
  67. @{" Re: Tasks " Link "Mail_45"}      Duane McDonnell
  68. @{" Re: Re: Tasks " Link "Mail_46"}      Duane McDonnell
  69. @{" List Newbie + VBCC/BOOPSI questions " Link "Mail_47"}      "Sealey, M."
  70. @{" Re: Tasks " Link "Mail_48"}      Allan Odgaard
  71. @{" Compiling for PPC " Link "Mail_49"}      Kim Sindalsen
  72. @{" Re: Tasks " Link "Mail_50"}      Ilkka Lehtoranta
  73. @{" Re: Tasks " Link "Mail_51"}      Tak Tang
  74. @{" Re: Re: Tasks " Link "Mail_52"}      Olaf Barthel
  75. @{" a2ixlibrary " Link "Mail_53"}      Joar Sivertsen
  76. @{" pure programs " Link "Mail_54"}      Linus McCabe
  77. @{" Re: a2ixlibrary " Link "Mail_55"}      Joar Sivertsen
  78. @{" Re: Tasks " Link "Mail_56"}      Andrew Bell
  79. @{" Re: Tasks " Link "Mail_57"}      Andrew Bell
  80. @{" Re: pure programs " Link "Mail_58"}      Linus McCabe
  81. @{" Re: Tasks " Link "Mail_59"}      Ilkka Lehtoranta
  82. @{" Re: pure programs " Link "Mail_60"}      Duane McDonnell
  83. @{" Re: Re: Tasks " Link "Mail_61"}      Duane McDonnell
  84. @{" Re: pure programs " Link "Mail_62"}      Linus McCabe
  85. @{" Re: pure programs " Link "Mail_63"}      Jonas Hulten
  86. @{" Re: pure programs " Link "Mail_64"}      Stephen Illingworth
  87. @{" Re: List Newbie + VBCC/BOOPSI questions " Link "Mail_65"}      "Nathan J. Young"
  88. @{" Screen colors wrong " Link "Mail_66"}      Jack York
  89. @{" Can somebody with OS35 do a test for me? " Link "Mail_67"}      Niels de Koning
  90. @{" Re: pure programs " Link "Mail_68"}      Colin Wenzel
  91. @{" Re: Re: pure programs " Link "Mail_69"}      Duane McDonnell
  92. @{" RE: Re: List Newbie + VBCC/BOOPSI questions " Link "Mail_70"}      "Sealey, M."
  93. @{" HiSOFT C++ and MUI and Hooks... " Link "Mail_71"}      Alexander Niven-Jenkins
  94. @{" Re: List Newbie + VBCC/BOOPSI questions " Link "Mail_72"}      "Nathan J. Young"
  95. @{" Re: HiSOFT C++ and MUI and Hooks... " Link "Mail_73"}      Allan Odgaard
  96. @{" Re: HiSOFT C++ and MUI and Hooks... " Link "Mail_74"}      Alexander Niven-Jenkins
  97. @{" HiSOFT C++ and starting from WB... " Link "Mail_75"}      Alexander Niven-Jenkins
  98. @{" HiSOFT C++ and starting from WB... " Link "Mail_76"}      Tak Tang
  99. @{" Joysticks " Link "Mail_77"}      "Alastair M. Robinson"
  100. @{" Re: HiSOFT C++ and starting from WB... " Link "Mail_78"}      Andrew Bell
  101. @{" How to print text fast? " Link "Mail_79"}      Allan Odgaard
  102. @{" About CGI scripts in C++ and address correction. " Link "Mail_80"}      Dr Brain Damage
  103. @{" Re: HiSOFT C++ and starting from WB... " Link "Mail_81"}      Alexander Niven-Jenkins
  104. @{" Re: How to print text fast? " Link "Mail_82"}      Duane McDonnell
  105. @{" Re: How to print text fast? " Link "Mail_83"}      Duane McDonnell
  106. @{" Re: About CGI scripts in C++ and address correction. " Link "Mail_84"}      Allan Odgaard
  107. @{" Re: How to print text fast? " Link "Mail_85"}      Allan Odgaard
  108. @{" Re: How to print text fast? " Link "Mail_86"}      Allan Odgaard
  109. @{" Re: Re: About CGI scripts in C++ and address correction. " Link "Mail_87"}      Andrija Antonijevic
  110. @{" Re: About CGI scripts in C++ and address correction. " Link "Mail_88"}      Allan Odgaard
  111. @{" Re: About CGI scripts in C++ and address correction. " Link "Mail_89"}      Duane McDonnell
  112. @{" Re: About CGI scripts in C++ and address correction. " Link "Mail_90"}      Stephen Illingworth
  113. @{" Re: Re: How to print text fast? " Link "Mail_91"}      Duane McDonnell
  114. @{" HiSOFT C++ and starting from WB... " Link "Mail_92"}      "Alastair M. Robinson"
  115. @{" Re: psx controler help request. " Link "Mail_93"}      "William W. Toner II"
  116. @{" psx controler help request. " Link "Mail_94"}      Steven Dobbs
  117. @{" Re: psx controler help request. " Link "Mail_95"}      Alexander Niven-Jenkins
  118. @{" Re: psx controler help request. " Link "Mail_96"}      Kelly Samel
  119. @{" should I make my config.library public ??? " Link "Mail_97"}      David Arbuthnot
  120. @{" Re: should I make my config.library public ??? " Link "Mail_98"}      Christian Hattemer
  121. @{" Re: HiSOFT C++ and starting from WB... " Link "Mail_99"}      Alexander Niven-Jenkins
  122. @{" NewObject() from a seperate process??? " Link "Mail_100"}      David Arbuthnot
  123. @{" Pattern dither in Adobe Photoshop, how and what? " Link "Mail_101"}      Allan Odgaard
  124. @{" Pattern dither follow up. " Link "Mail_102"}      Allan Odgaard
  125. @{" Screensavers " Link "Mail_103"}      ddawn347@yahoo.com
  126. @{" Begginners-question regarding memory allocation " Link "Mail_104"}      Stephan Huebner
  127. @{" Re: Begginners-question regarding memory allocation " Link "Mail_105"}      Christian Hattemer
  128. @{" Bad Link Library " Link "Mail_106"}      David Arbuthnot
  129. @{" Re: Begginners-question regarding memory allocation " Link "Mail_107"}      Charles Barr
  130. @{" Re: Begginners-question regarding memory allocation " Link "Mail_108"}      Tim Hanson
  131. @{" Re: Begginners-question regarding memory allocation " Link "Mail_109"}      Stephan Huebner
  132. @{" Re: Begginners-question regarding memory allocation " Link "Mail_110"}      Stephan Huebner
  133. @{" Re: Begginners-question regarding memory allocation " Link "Mail_111"}      Andrew Bell
  134. @{" Re: Begginners-question regarding memory allocation " Link "Mail_112"}      Charles Barr
  135. @{" Re: Begginners-question regarding memory allocation (+attachments) " Link "Mail_113"}      "Nathan J. Young"
  136. @{" Re: Re: Begginners-question regarding memory allocation (+attachments " Link "Mail_114"}      Duane McDonnell
  137. @{" Pattern dither in Adobe Photoshop, how and what? " Link "Mail_115"}      "Alastair M. Robinson"
  138. @{" Re: Begginners-question regarding memory allocation (+attachments) " Link "Mail_116"}      Stephan Huebner
  139. @{" Re: Begginners-question regarding memory allocation " Link "Mail_117"}      Stephan Huebner
  140. @{" Re: Begginners-question regarding memory allocation (+attachments) " Link "Mail_118"}      Allan Odgaard
  141. @{" Re: Begginners-question regarding memory allocation " Link "Mail_119"}      Charles Barr
  142. @{" Mui future. " Link "Mail_120"}      Vincent Morenas
  143. @{" Re: Begginners-question regarding memory allocation " Link "Mail_121"}      Christian Hattemer
  144. @{" Re: Begginners-question regarding memory allocation " Link "Mail_122"}      Jack York
  145. @{" Re: Begginners-question regarding memory allocation (+attachments) " Link "Mail_123"}      "Nathan J. Young"
  146. @{" Re: Begginners-question regarding memory allocation " Link "Mail_124"}      Ilkka Lehtoranta
  147. @{" Re: Mui future. " Link "Mail_125"}      Ilkka Lehtoranta
  148. @{" Re: Begginners-question regarding memory allocation " Link "Mail_126"}      roderick_maclean@agilent.com
  149. @{" Re: Begginners-question regarding memory allocation " Link "Mail_127"}      roderick_maclean@agilent.com
  150. @{" "explode" image " Link "Mail_128"}      andrewmarkwell@ukonline.co.uk
  151. @{" Geek gadgets CD " Link "Mail_129"}      Charles Barr
  152. @{" Telling when printing is stopped. " Link "Mail_130"}      Charles Barr
  153. @{" AW: Geek gadgets CD " Link "Mail_131"}      Fritsch Alexander
  154. @{" Odp: Pattern dither in Adobe Photoshop, how and what? " Link "Mail_132"}      Michal Bartczak
  155. @{" Hello there! I'm new here! ;
  156. ) " Link "Mail_133"}      fgloch@yahoo.com
  157. @{" Bobs and GELS " Link "Mail_134"}      Lee Atkins
  158. @{" Re: Pattern dither in Adobe Photoshop, how and what? " Link "Mail_135"}      Allan Odgaard
  159. @{" Re: "explode" image " Link "Mail_136"}      Duane McDonnell
  160. @ENDNODE
  161. @NODE "Mail_0" " Re: lowlevel.library and 060 "
  162. From: Mike Carter <mike.carter@bigfoot.com>
  163. Date: 12-28-99 00:16:27
  164. Subject: @{b}Re: lowlevel.library and 060@{ub}
  165. From: Mike Carter <mike.carter@bigfoot.com>
  166. Hi Tim thanks for your mail that I got on 15-Dec-99
  167. > Can anyone confirm or deny this problem? Does anyone
  168. > have some joypad reading code either in C or PPC
  169. > assembler?
  170. Somebody sent a test program to the list a while back. 
  171. I tested it on my 060 and it appeared to be responding
  172. to all buttons fine!  And the games which do use the
  173. lowlevel.library all work fine (AFAIK).  I think
  174. Wipeout2097 uses lowlevel.library on PPC? - The demo
  175. was perfect on my machine.
  176. Hope this is of help - I'll be willing to test your
  177. code on my machine.  Contact me direct before sending
  178. anything though :)
  179. Cheers,
  180. M!Ke C.
  181. .--------------------------------- ---- -    -- --------.
  182. | AMiGA 1200EZT 060/PPC@240Mhz,50Mb RAM __/\__          |
  183. | 4 HDD,DD FD,5 CD-ROMS,CDrW,ZiP250     \ o0 / bUDDa/S^D|
  184. | SCSI+IDE,56kModem,BVGfX,19"VDU        /_'-_\          |
  185. `------------------------------- --- -    \/   -- ------'
  186.   http://fly.to/BuddasWurld               ICQ: 29173597
  187. @ENDNODE
  188. @NODE "Mail_1" " Re: Check your sources for Y2K bugs! "
  189. From: Allan Odgaard <Duff@DIKU.DK>
  190. Date: 01-01-00 13:17:28
  191. Subject: @{b}Re: Check your sources for Y2K bugs!@{ub}
  192. From: Allan Odgaard <Duff@DIKU.DK>
  193. On 31-Dec-99, Andrew Bell wrote:
  194. >        "x = '%x' (shorthand date)\n"
  195. Is the shorthand format defined? Or is this up to the implementer? I'm asking
  196. because the standard StormC link library prints 'Jan 01 2000' where the
  197. StormAmiga link lib outputs '01/01/00'. IMHO the first isn't really shorthand
  198. notation...
  199. Regards Allan
  200.      URL: http://www.DIKU.dk/students/duff/
  201. Press any key to continue or any other key to quit...
  202. @ENDNODE
  203. @NODE "Mail_2" " LoadSeg() "
  204. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  205. Date: 01-01-00 18:52:38
  206. Subject: @{b}LoadSeg()@{ub}
  207. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  208. Hello,
  209.      Im trying to implement a module system. Each module
  210. implements defined function. They will be compiled as object code by the
  211. use and loaded in using LoadSeg. I want to keep all the modules in a list.
  212. But How do I call the function that is in the loaded object code.
  213. Kind regards
  214.           Charles Barr
  215.    Emerald Amiga Users
  216.    URL:  http://www.emerald.org.uk/wordpad/
  217. Some people hope to achieve immortality through their works or their
  218. children.  I would prefer to achieve it by not dying.
  219. -- Woody Allen
  220. @ENDNODE
  221. @NODE "Mail_3" " Re: Check your sources for Y2K bugs! "
  222. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  223. Date: 01-01-00 19:03:33
  224. Subject: @{b}Re: Check your sources for Y2K bugs!@{ub}
  225. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  226. Hi Allan,
  227. On 01-Jan-00 you wrote: [amiga-c] Re: Check your sources for Y2K bugs!
  228. >>        "x = '%x' (shorthand date)\n"
  229. > Is the shorthand format defined? Or is this up to the implementer?
  230. I don't know.
  231. > I'm asking because the standard StormC link library prints 'Jan 01
  232. > 2000' where the StormAmiga link lib outputs '01/01/00'. IMHO the
  233. > first isn't really shorthand notation...
  234. The term "shorthand" comes from the Hisoft C++ docs, I'm not sure if
  235. it's correct or not. As for the format, Hisoft should print out this
  236. format "Jan 01 2000", but because of a Y2K bug, instead gives "Jan 01
  237. 20". :-/
  238. Regards, Andrew Bell.
  239. +----------------------------------------+ 
  240. email: mailto:andrew.ab2000@bigfoot.com or
  241.        mailto:andrew@ab2000.prestel.co.uk
  242. web:   http://www2.prestel.co.uk/ab2000
  243. +----------------------------------------+
  244. Phone your Moderator at 3 A.M. for free taglines...!!!!
  245. @ENDNODE
  246. @NODE "Mail_4" " SAS/C SE Configuration problem "
  247. From: jsteic1957@aol.com
  248. Date: 01-02-00 02:25:46
  249. Subject: @{b}SAS/C SE Configuration problem@{ub}
  250. From: jsteic1957@aol.com
  251. TO:      Bob Lanham <bobl@jaxproductions.com>
  252. FROM:    Jim Steichen <jsteic1957@aol.com>
  253. Subject: Re: SE version 6.58 Bug?
  254. > Anyone else noticed that SAS/C editor SE version 6.58 is broke regarding
  255. > configuration settings?
  256. > I've used it to change the text colors, and had no problems.  What
  257. > problem did it give you?
  258. Really?  You got your 6.58 SE to change the text colors?  I can't even
  259. get mine to do that.  The menu item for setting/selecting how SE displays
  260. C source code doesn't even show up anymore.  I told the guy that was 
  261. taking care of the SAS-C updates about this, but he didn't seem to know 
  262. what I was complaining about.  It would be helpful if there was some 
  263. documentation on how the se.dat file is constructed.  Saving the changes 
  264. I make to SE's configuration seem to cause the OS (V3.5) some sort of 
  265. grief since it slows down & finally recovers. 
  266. @ENDNODE
  267. @NODE "Mail_5" " Re: SAS/C SE Configuration problem "
  268. From: meyersfamily <meyersfamily@home.com>
  269. Date: 01-02-00 04:39:04
  270. Subject: @{b}Re: SAS/C SE Configuration problem@{ub}
  271. From: meyersfamily <meyersfamily@home.com>
  272. Haven't had that particular problem.  But I'm using the 6.57 version
  273. of SE and it's fine.
  274. -----------Reply Seperator---------
  275. > From: jsteic1957@aol.com
  276. > TO:      Bob Lanham <bobl@jaxproductions.com>
  277. > FROM:    Jim Steichen <jsteic1957@aol.com>
  278. > Subject: Re: SE version 6.58 Bug?
  279. >> Anyone else noticed that SAS/C editor SE version 6.58 is broke regarding
  280. >> configuration settings?
  281. >> I've used it to change the text colors, and had no problems.  What
  282. >> problem did it give you?
  283. > Really?  You got your 6.58 SE to change the text colors?  I can't even
  284. > get mine to do that.  The menu item for setting/selecting how SE displays
  285. > C source code doesn't even show up anymore.  I told the guy that was 
  286. > taking care of the SAS-C updates about this, but he didn't seem to know 
  287. > what I was complaining about.  It would be helpful if there was some 
  288. > documentation on how the se.dat file is constructed.  Saving the changes 
  289. > I make to SE's configuration seem to cause the OS (V3.5) some sort of 
  290. > grief since it slows down & finally recovers. 
  291. @ENDNODE
  292. @NODE "Mail_6" " A virtual delete operator? "
  293. From: Allan Odgaard <Duff@DIKU.DK>
  294. Date: 01-02-00 13:02:04
  295. Subject: @{b}A virtual delete operator?@{ub}
  296. Hi there,
  297. Imagine I overload new & delete for my Dummy-class. Then I create a subclass
  298. where I do the same. Now if I delete an instance of the subclass, but with the
  299. pointer declared as 'class Dummy *' then the delete operator of my superclass
  300. is invoked.  Normally I'd declare a function 'virtual' to avoid this problem,
  301. but that doesn't seem to be possible for the delete operator (only the
  302. destructor) -- so what should I do?
  303. I attached a small program to illustrate the problem better. It prints:
  304.    Super-alloc 0 bytes
  305.    Sub-alloc 0 bytes
  306.    Super-Free 0 bytes at 099e639c
  307.    Super-Free 0 bytes at 099e6394
  308. But I want it to say:
  309.    Super-alloc 0 bytes
  310.    Sub-alloc 0 bytes
  311.    Sub-Free 0 bytes at 099e639c
  312.    Super-Free 0 bytes at 099e6394
  313. Regards Allan
  314.      URL: http://www.DIKU.dk/students/duff/
  315. Buy Pentium Pro 400MHz! You reboot faster...
  316. @ENDNODE
  317. @NODE "Mail_7" " Re: LoadSeg() "
  318. From: Colin Wenzel <colstv@hotkey.net.au>
  319. Date: 01-02-00 15:11:15
  320. Subject: @{b}Re: LoadSeg()@{ub}
  321. From: Colin Wenzel <colstv@hotkey.net.au>
  322. On 02-Jan-00, Charles Barr wrote:
  323. > From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  324. > Hello,
  325. >     Im trying to implement a module system. Each module implements
  326. > defined function. They will be compiled as object code by the use and
  327. > loaded in using LoadSeg. I want to keep all the modules in a list.
  328. > But How do I call the function that is in the loaded object code.
  329. Create a library instead,  unless you are trying to impliment  
  330. some sort of  executable  "plug-in"  type system.
  331. If so, LoadSeg() only works on executable objects,
  332. it returns a BPTR to the segment.
  333. Convert it to an (APTR) by:     (ulong)pointer <<=2;
  334. A BCPL pointer to the next segment is at  pointer.
  335. (or NULL if no next segment exists)
  336. The first instruction begins at  4 bytes past the 
  337. (APRT) converted pointer.
  338. You had better do the startup code in ASM.....
  339. -------------------------------------
  340. Colin Wenzel. Australia.
  341. EMAIL:  mailto:colstv@hotkey.net.au
  342. URL:       http://www.hotkey.net.au/~colstv/
  343. ICQ:       17608330
  344. MADE WITH 'AMIGA' 4000T With O.S 3.1
  345. ---------------------------------------
  346. @ENDNODE
  347. @NODE "Mail_8" " SAS/C Date Problem "
  348. From: Bablos <bablos@cableinet.co.uk>
  349. Date: 01-02-00 15:31:41
  350. Subject: @{b}SAS/C Date Problem@{ub}
  351. From: Bablos <bablos@cableinet.co.uk>
  352. Hi There...
  353. As a number of you will probably know, there's a problem with using
  354. __AMIGADATE__ in SAS/C.  I'm using 6.58, and include the __AMIGADATE__
  355. as a part of the version string.
  356. Today , 2nd Jan 2000, shows up as (2.1.0), which looks more like the
  357. programs version number.
  358. Is there a way around this?  Ideally, I'd like it to say (02.01.2000).  I
  359. just wonder if there's a special little routine hidden away somewhere
  360. which could rectify the problem.
  361. Hope someone can help...
  362. Bablos.
  363. @ENDNODE
  364. @NODE "Mail_9" " AmigaOS 3.5 & ReadPixelLine8() "
  365. From: Niels de Koning <ndk@bart.nl>
  366. Date: 01-02-00 18:16:35
  367. Subject: @{b}AmigaOS 3.5 & ReadPixelLine8()@{ub}
  368. From: Niels de Koning <ndk@bart.nl>
  369. Since I have installed AmigaOS 3.5 one of the command line tools I 
  370. wrote no longer works as I intended. I have been trying to figure
  371. out what is going on but I have to admit that the absence of a
  372. nice debug tool is driving me slightly mad.
  373. Problem description:
  374. When I read a pixelline from a datatype picture object the 
  375. pixelvalues I get are all zeroes!
  376. In more detail:
  377. When I use the ReadPixelLine8() function I expect to get an array with
  378. values that indicate which palette entry was used for a certain pixel.
  379. Before my OS3.5 installation this worked as I expected. Now it no longer
  380. works and I have NO IDEA why.
  381. Does anybody have any idea what I am doing wrong or who I can ask for
  382. help. If you want to see the C-sourcecode let me know and I'll mail it.
  383. Anyone? please?
  384. btw. The source is for a (very little:-) program that counts the 
  385. number of unique colors in a picture that is loaded through the 
  386. Amiga's datatype system.
  387. Best regards,
  388. // Niels de Koning
  389.  ____________________________________________________________________
  390.  Co-editor on 3D Addict's GFXZone              http://www.gfxzone.org
  391. @ENDNODE
  392. @NODE "Mail_10" " Register usage for doubles "
  393. From: ROBERT MEYERS <meyersrl@songs.sce.com>
  394. Date: 01-02-00 23:59:20
  395. Subject: @{b}Register usage for doubles@{ub}
  396. From: "ROBERT MEYERS"<meyersrl@songs.sce.com>
  397. Ok, I some really dumb questions.  I'm working on trying to place some 
  398. commonly used functions of mine into an exec library.  Many of the 
  399. functions take doubles and floats as parameters.  An example Autodoc entry 
  400. is below.
  401. My question is how do I specify the registers the doubles and floats will 
  402. use?  Does a double take up two CPU data registers?  If it is an array of 
  403. doubles, do I use an address register like for a pointer?
  404. Also, I'd like to have this library be able to use an FPU, I know that the 
  405. SAS/C fd2pragma utility will not handle the FP0 - FP7 registers in the FPU 
  406. correctly and I will have to do that manually.  For the autodoc entry, is 
  407. FP0 an acceptable register to specify?
  408. If there is a specific passage in the SAS/C Manual, RKM's, or Guru Book 
  409. concerning these issues please give me a page number.  
  410. Thanks!
  411. Bob Meyers
  412. ==========================================================================
  413. /* Example partial Autodoc entry. */
  414. *   NAME   
  415. *       Coordinate data series
  416. *   SYNOPSIS
  417. *       CoordSeries(FDBptr, Scalar, Grades[], Values[], ValCnt, status);
  418. *                   A0      D0      A1        A2        D2      A3
  419. *       void CoordSeries(struct FDB *, double, float, const int, int *);
  420. *   FUNCTION
  421. *   INPUTS
  422. *       struct FDB *FDBptr - 
  423. *       double Scalars - 
  424. *       double Grades[] - 
  425. *       float Values[] - 
  426. *       const int ValCnt - 
  427. *       int *statusPtr - 
  428. @ENDNODE
  429. @NODE "Mail_11" " FPrintf() equivalent? "
  430. From: W1bBle <layabouts@the-giant-sofa.demon.co.uk>
  431. Date: 01-03-00 04:27:55
  432. Subject: @{b}FPrintf() equivalent?@{ub}
  433. From: W1bBle <layabouts@the-giant-sofa.demon.co.uk>
  434. Hi everyone,
  435. I'm not sure whether this is the right place to ask this, but here goes....
  436. Is there a function in linux equivalent to FPrintf() under AmigaOS? I
  437. desperately need it to port a program of mine.
  438. Thanks,
  439. Giles
  440. @ENDNODE
  441. @NODE "Mail_12" " Re: FPrintf() equivalent? "
  442. From: Oliver Roberts <oliver.roberts@iname.com>
  443. Date: 01-03-00 20:20:59
  444. Subject: @{b}Re: FPrintf() equivalent?@{ub}
  445. From: "Oliver Roberts" <oliver.roberts@iname.com>
  446. On 03-Jan-00 03:27:55 GMT, W1bBle wrote:
  447. > Is there a function in linux equivalent to FPrintf() under AmigaOS? I
  448. > desperately need it to port a program of mine.
  449. Errrm... fprintf() - it's a standard ANSI C function.  Of course, you
  450. must also use fopen() to open the files, instead of DOS Open().
  451.  *Oliver Roberts*  -  Norwich, UK  -  Software Developer & Web Designer
  452.  /oliver.roberts@iname.com/  |  /oliver@amigaf1.freeserve.co.uk/
  453.  http://www.nanunanu.org/~oliver/  -  ICQ: 34640231
  454.  The Amiga RC5 Team Effort ==> http://distributed.amiga.org/
  455. <tsb>
  456. @ENDNODE
  457. @NODE "Mail_13" " Re: A virtual delete operator? "
  458. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  459. Date: 01-04-00 20:57:15
  460. Subject: @{b}Re: A virtual delete operator?@{ub}
  461. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  462. Hi Allan,
  463. > Normally I'd declare a function 'virtual' to avoid this problem, but that
  464. > doesn't seem to be possible for the delete operator (only the destructor)
  465. -- so > what should I do?
  466. Just for future reference, the new and delete operators for a class are
  467. automatically made static, and static functions can not be virtual. They
  468. are defined as being static because they are invoked before and after the
  469. life-time of an object!
  470. To solve the problem, you just need to define a virtual destructor in your
  471. base class (Dummy in your example). Because you have not written
  472. destructors for either class, the compiler will conveniently give you one
  473. for free.
  474. Unfortunately, my version of StormC does not produce the expected result (a
  475. possible bug?), but the GNU C++ compiler works fine!
  476. Pit-falls like this, and many others are well documented in Scott Meyers'
  477. Effective C++ (2nd Edition) and More Effective C++ books. They're worth
  478. every penny (as the expression goes :).
  479. Kind regards
  480. Nathan
  481. @ENDNODE
  482. @NODE "Mail_14" " BOOPSI Prop Gadgets "
  483. From: "Alastair M. Robinson" <blackfive@fakenhamweb.co.uk>
  484. Date: 01-04-00 22:55:18
  485. Subject: @{b}BOOPSI Prop Gadgets@{ub}
  486. Hi guys,
  487. Could one of you BOOPSI experts help me out?
  488. I'm writing a system hack allowing windows to be scrolled with wheelmice: 
  489. When my input handler receives a wheelmouse event, my main task hunts for
  490. prop gadgets and forges IDCMP_GADGETUP intuimessages from them.  This
  491. works beautifully with original and gadtools gadgets (and the scrollers in
  492. workbench windows), and for windows which don't have recognisable
  493. scrollers, I'm forging cursor key movements.  The only problem is with
  494. programs which ignore key presses, but have scrollers created with
  495. BOOPSI, BGUI or ClassAct.
  496. My question is this:  When trawling through the gadget list of someone
  497. else's window, is there any safe way of recognising a gadget created by
  498. propgclass?
  499. All the best,
  500. Alastair M. Robinson, email:blackfive@fakenhamweb.co.uk
  501. Amiga 4000/030, 18Meg RAM, 4.3Gig HD, Mustek ScanExpress 6000SP
  502. C, Assembler (68k, PIC16C84, learning ATMEL AVR), PostScript, ARexx,
  503. AMOSPro(!), AmigaDOS
  504. Hardware, n.: The parts of a computer system that can be kicked.
  505. @ENDNODE
  506. @NODE "Mail_15" " Re: A virtual delete operator? "
  507. From: Allan Odgaard <Duff@DIKU.DK>
  508. Date: 01-04-00 23:11:03
  509. Subject: @{b}Re: A virtual delete operator?@{ub}
  510. From: Allan Odgaard <Duff@DIKU.DK>
  511. On 04-Jan-00, Nathan J. Young wrote:
  512. > [...] the problem, you just need to define a virtual destructor in your
  513. > base class (Dummy in your example). [...] Unfortunately, my version of
  514. > StormC does not produce the expected result (a possible bug?) [...]
  515. OK, thanks for clarifying this! I did first try to add a virtual destructor,
  516. but it failed -- though after reading your reply I reported it as a bug of
  517. StormC (while playing with overloading new & delete for classes I found two
  518. other bugs, so it seems that this part of StormC is quite broken :-( )
  519. > Pit-falls like this, and many others are well documented in Scott Meyers'
  520. > Effective C++ (2nd Edition) and More Effective C++ books. They're worth
  521. > every penny (as the expression goes :).
  522. I'll keep that in mind for my wish list, thanks again :-)
  523. Regards Allan
  524.      URL: http://www.DIKU.dk/students/duff/
  525. Man invented language to satisfy his deep need to complain.
  526. -- Lily Tomlin
  527. @ENDNODE
  528. @NODE "Mail_16" " off the topic. "
  529. From: Dr Brain Damage <drbraindamage@angelfire.com>
  530. Date: 01-05-00 12:02:06
  531. Subject: @{b}off the topic.@{ub}
  532. Just in case someone is interested, theres a new free e-mail service. It gives 6Mb of free space which is at least biggest one i have seen.
  533. Its also so new, that i was actually the first one to acquire e-mail address from there, just two hours ago.
  534. URL is http://planetlinks.8k.com
  535.         - Dr.BrainDamage
  536. Angelfire for your free web-based e-mail. http://www.angelfire.com
  537. @ENDNODE
  538. @NODE "Mail_17" " Quick Q about Palette gads "
  539. From: Daithi O'Cuinn <docuinn@cluke.demon.co.uk>
  540. Date: 01-05-00 19:25:49
  541. Subject: @{b}Quick Q about Palette gads@{ub}
  542. Hello,
  543. I am using a Palette gadtools gadget in my program, but I can't get the
  544. currently selected colour to stay depressed - it depresses when you click the
  545. mouse on it, and releases when you let go, and I don't want this, I want it
  546. to constantly show which colour is selected. I know it's bound to be just a
  547. flag I'm missing, but I can't think what
  548. Code is:
  549.     ng.ng_TopEdge += ng.ng_Height + 5 + texty;
  550.     ng.ng_Height      = texty * 2;
  551.     ng.ng_GadgetText = "Background";
  552.     ng.ng_Flags = PLACETEXT_ABOVE;
  553.     ng.ng_GadgetID = BGCOLOUR;
  554.     gad = CreateGadget(PALETTE_KIND, gad, &ng, 
  555.         GTPA_Depth, 4,
  556.         GTPA_Color, background,
  557.         TAG_DONE);
  558. Daithi O'Cuinn
  559. docuinn@cluke.demon.co.uk
  560. @ENDNODE
  561. @NODE "Mail_18" " Re: Quick Q about Palette gads "
  562. From: Laura Vance <vancel@amiga.nols.com>
  563. Date: 01-05-00 19:37:40
  564. Subject: @{b}Re: Quick Q about Palette gads@{ub}
  565. Hello,
  566. I've never worked with a palette gadget in gadtools, but I do know that
  567. when I have programmed for the gadtools library, I had to be sure to only look
  568. for the mouseup which is the mouse button being released.
  569. The other thing that I had to do is set up a loop so that I only acted on the
  570. last IDCMP event that was passed to my program.  
  571. But, as with your problem, before I made those changes, I would click a button,
  572. release the mouse button, and the button would activate again or deactivate,
  573. depending on how the button was set up.
  574. Hope that helps a little bit.
  575. On Wed, 05 Jan 2000, you wrote:
  576. > Hello,
  577. > I am using a Palette gadtools gadget in my program, but I can't get the
  578. > currently selected colour to stay depressed - it depresses when you click the
  579. > mouse on it, and releases when you let go, and I don't want this, I want it
  580. > to constantly show which colour is selected. I know it's bound to be just a
  581. > flag I'm missing, but I can't think what
  582. > Code is:
  583. >     ng.ng_TopEdge += ng.ng_Height + 5 + texty;
  584. >     ng.ng_Height      = texty * 2;
  585. >     ng.ng_GadgetText = "Background";
  586. >     ng.ng_Flags = PLACETEXT_ABOVE;
  587. >     ng.ng_GadgetID = BGCOLOUR;
  588. >     gad = CreateGadget(PALETTE_KIND, gad, &ng, 
  589. >         GTPA_Depth, 4,
  590. >         GTPA_Color, background,
  591. >         TAG_DONE);
  592. > TIA,
  593. > -- 
  594. > Daithi O'Cuinn
  595. > docuinn@cluke.demon.co.uk
  596. > --------------------------- ONElist Sponsor ----------------------------
  597. > Independent contractors: Find your next project gig through JobSwarm!
  598. >         You can even make money by referring friends.
  599. > <a href=" http://clickme.onelist.com/ad/jobswarm2 ">Click Here</a>
  600. > ------------------------------------------------------------------------
  601. >      -> Spread the URL: http://www.onelist.com/subscribe/amiga-c <- 
  602. > ========================================================================
  603. > To UNSUBSCRIBE from this community, send an email to: 
  604. >   amiga-c-unsubscribe@onelist.com
  605. > and reply to the confirmation email we send you.
  606. > ========================================================================
  607. Later,
  608. Laura
  609.       \|/
  610.      (o O)
  611. ---oOO(_)OOo---
  612.   Peekaboo!!!
  613. @ENDNODE
  614. @NODE "Mail_19" " Problems with active object... "
  615. From: "Andrzej J. Debicki" <denbi@softsystem.pl>
  616. Date: 01-06-00 08:09:55
  617. Subject: @{b}Problems with active object...@{ub}
  618. Hello,
  619. I have a class (from Group) - MyClass. In the class I have some objects. One of them is
  620. Listview which has MUIA_CycleChain set to 1 (no other objects in
  621. CycleChain). Then I have MyWindow class (from Window). MyWindow
  622. consists two MyClass'es. Everything is OK when I cycle with TAB
  623. through my listviews. But when I click other object in MyClass or
  624. outside MyClass (some string object) the frame around listvieww
  625. disappears, active object changes to the other listview :-(.
  626. And sometimes active object changes to some other object
  627. :-(((. Whats going on? Is it MUI bug or I made an error?
  628.  _       *       Andrzej J. Debicki       *   A12ooT  34MB
  629.  \\  _  *  PANS - Polish Amiga News Squad  *    6o3e/o6o
  630.   \\//  *       denbi@friko3.onet.pl       *   BVisionPPC
  631.    \/    *   http://republika.pl/denbi    *   AmigaOS  3.5
  632. -----------------------------------------------------------
  633. @ENDNODE
  634. @NODE "Mail_20" " Re: Problems with active object... "
  635. From: Allan Odgaard <Duff@DIKU.DK>
  636. Date: 01-06-00 12:29:42
  637. Subject: @{b}Re: Problems with active object...@{ub}
  638. On 06-Jan-00, Andrzej J. Debicki wrote:
  639. > [...] click other object in MyClass or outside MyClass (some string object)
  640. > the frame around listvieww disappears,
  641. Clicking a stringgadget will always make it active. The same goes for
  642. textfields (like TextEditor.mcc) -- I think NList has some weird thing about
  643. going active or becoming 'default' when clicked, but you aren't using this,
  644. right?
  645. > active object changes to the other
  646. > listview :-(. And sometimes active object changes to some other object :-(((.
  647. > Whats going on? Is it MUI bug or I made an error?
  648. It's not a problem I've seen.  If you send the sources then we can probably
  649. help you better. Btw: You do know about the MUI@OneList.com list, right? :-)
  650. Regards Allan
  651.      URL: http://www.DIKU.dk/students/duff/
  652. WinErr 43e: Modem driver corrupt. Download latest version any try again.
  653. @ENDNODE
  654. @NODE "Mail_21" " Windows "
  655. From: Steffen <steffen.mars@stenloese.mail.telia.com>
  656. Date: 01-06-00 18:33:22
  657. Subject: @{b}Windows@{ub}
  658. The following code works fine, printing 'word' across the window, but if i skip the window.Activate() (wich calls ActivateWindow();), i will receive no printing and the program eventually locks up, but the latter only occasionaly. I've come to the conclusion that the error occurs because the window is not physicly open, when i try to print to it, or receive messages (using WaitClose). Eventually, the activation of the window causes either a pause that allows intuition to 'really' open the window, or the call itself forces intuition to finish opening ?
  659. So OpenWindow() does not ensure the window is actually open,  yes ?
  660. And if yes, is calling ActivateWindow() (or specifying WA_Activate in taglist); the 'right' way to solve the problem ?
  661. Thank you.
  662. void main()
  663.     {
  664.     int    x;
  665.     // OpenWindowTagList() is used to create a window for 'window'
  666.     WinX    window("Test_Window",0,0,640,512);
  667.     // This Creates an IntuiText derived object
  668.     IWord    a_word("word"); 
  669.     // Prog doesn't work if this line is skipped
  670.     // It calls ActivateWindow();
  671.     window.Activate(); 
  672.     // Print the text across the screen
  673.     // Uses PrintIText();
  674.     for (x=0; x<256; x+=16) window.Print(a_word,x,x);
  675.     window.WaitClose();
  676.     }
  677. @ENDNODE
  678. @NODE "Mail_22" " Re: Quick Q about Palette gads "
  679. From: Daithi O'Cuinn <docuinn@cluke.demon.co.uk>
  680. Date: 01-06-00 19:57:13
  681. Subject: @{b}Re: Quick Q about Palette gads@{ub}
  682. Hello Laura
  683. On 05-Jan-00, Laura Vance wrote:
  684. > Hello,
  685. > I've never worked with a palette gadget in gadtools, but I do know that when
  686. > I have programmed for the gadtools library, I had to be sure to only look
  687. > for the mouseup which is the mouse button being released.
  688. I do only look for GadetUp...
  689. > But, as with your problem, before I made those changes, I would click a
  690. > button, release the mouse button, and the button would activate again or
  691. > deactivate, depending on how the button was set up.
  692. I think it is a simpler problem that this - I get events from the gadget fine,
  693. it's just that it does not  permanently show the currently selected entry (ie
  694. the little 'paint pot' does not stay depressed).
  695. That's why I think it's something as simple as a flag. Though you have given
  696. me a clue - it could well be my IDCMP messages - I only ask for 
  697. IDCMP_CLOSEWINDOW | IDCMP_GADGETUP
  698. Any one any ideas?
  699. Regards
  700. Daithi O'Cuinn
  701. docuinn@cluke.demon.co.uk
  702. @ENDNODE
  703. @NODE "Mail_23" " Re: Re: Quick Q about Palette gads "
  704. From: Gregory Roberts II <gregr@en.com>
  705. Date: 01-06-00 20:49:27
  706. Subject: @{b}Re: Re: Quick Q about Palette gads@{ub}
  707. On Thu, 6 Jan 2000, Daithi O'Cuinn wrote:
  708. > Hello Laura
  709. > I do only look for GadetUp...
  710. > I think it is a simpler problem that this - I get events from the gadget fine,
  711. > it's just that it does not  permanently show the currently selected entry (ie
  712. > the little 'paint pot' does not stay depressed).
  713. > That's why I think it's something as simple as a flag. Though you have given
  714. > me a clue - it could well be my IDCMP messages - I only ask for 
  715. > IDCMP_CLOSEWINDOW | IDCMP_GADGETUP
  716. > Any one any ideas?
  717. > Regards
  718. Are you using GetIMsg() to retrieve the messages?  GadTools gadgets
  719. generate a lot of IDCMP events that you don't care about and are handled
  720. by the gadget.  When you call GetIMsg() you get the "distilled" version of
  721. things.  
  722. Also, I don't have the information right in front of me, but somewhere in
  723. the include files are defines for which types of IDCMP messages you should
  724. ask for when you set up the window.  So, instead of specifically asking
  725. for IDCMP_GADGETUP, you'd ask for the IDCMP message for the palette
  726. gadget.  If you need more clarification on this, just write and I'll dig
  727. up the info.  
  728. BTW, if you want an example of using GadTools gadgets, I wrote a skeleton
  729. C application for a contest some time ago.  You might still be able to
  730. find it on Aminet as Skeleton_C.lha, or from my (woefully outdated)
  731. website at http://www.en.com/users/gregr.   I don't think I have a palette
  732. gadget in there, but I do use a number of different ones so you should be
  733. able to get the general idea.
  734. Good luck!
  735. gregr@en.com
  736. KC8BGC
  737. Amiga Enthusiast  :)
  738. IBM programmer    :(
  739. @ENDNODE
  740. @NODE "Mail_24" " The future of StormAmiga.lib!!! "
  741. From: Allan Odgaard <Duff@DIKU.DK>
  742. Date: 01-06-00 20:52:31
  743. Subject: @{b}The future of StormAmiga.lib!!!@{ub}
  744. Hi there,
  745. Since Matthias Henze (author of the StormAmiga.lib link library) only received
  746. two letters of endorsement, regarding the continued development of
  747. StormAmiga.lib, he naturally got a feeling that it wasn't worth continuing the
  748. project.  However, before he terminates it then he's given us a chance to
  749. prove that we actually do want the library, so if you do use the library and
  750. want to see it developed further, please go visit the survey at:
  751.    http://www.cyberdynesystems.de/Statement2_e.html
  752. Regards Allan
  753.      URL: http://www.DIKU.dk/students/duff/
  754. WinErr 43e: Modem driver corrupt. Download latest version any try again.
  755. @ENDNODE
  756. @NODE "Mail_25" " Re: Re: Quick Q about Palette gads "
  757. From: David McMinn <dave@satanicdreams.com>
  758. Date: 01-06-00 20:54:03
  759. Subject: @{b}Re: Re: Quick Q about Palette gads@{ub}
  760. Hi Daithi
  761. > gadget fine, it's just that it does not  permanently show the
  762. > currently selected entry (ie the little 'paint pot' does not stay
  763. > depressed). That's why I think it's something as simple as a flag.
  764. I didn't read the original post you sent, but have you tried 
  765. #GTPA_IndicatorWidth and/or #GTPA_IndicatorHeight set to the 
  766. width/height of the border to put round the colour, when you are 
  767. creating the gadget?
  768. |) /\ \/ ][ |)   |\/| 
  769.  |\/| ][ |\| |\|   |   dave@satanicdreams.com
  770.    http://members.xoom.com/David_McMinn   |   ICQ=16827694
  771. A crab in the hand is worth two in the bush.
  772. @ENDNODE
  773. @NODE "Mail_26" " Tasks "
  774. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  775. Date: 01-06-00 21:10:45
  776. Subject: @{b}Tasks@{ub}
  777. Hi all,
  778. Is this there a system friendly way of determining if a task pointer
  779. is still valid, without having to traverse the execbase lists?
  780. Regards, Andrew Bell.
  781. +----------------------------------------+ 
  782. email: mailto:andrew.ab2000@bigfoot.com or
  783.        mailto:andrew@ab2000.prestel.co.uk
  784. web:   http://www2.prestel.co.uk/ab2000
  785. +----------------------------------------+
  786. Spock.SpockSpockTransmit now. * Kirk
  787. @ENDNODE
  788. @NODE "Mail_27" " Re: Tasks "
  789. From: Laura Vance <vancel@amiga.nols.com>
  790. Date: 01-06-00 23:47:47
  791. Subject: @{b}Re: Tasks@{ub}
  792. On Thu, 06 Jan 2000, you wrote:
  793. > Hi all,
  794. > Is this there a system friendly way of determining if a task pointer
  795. > is still valid, without having to traverse the execbase lists?
  796. > Regards, Andrew Bell.
  797. I'm not sure exactly what you need it for, but I have a method to check if a
  798. copy of my program is already running by using the "FindTask()" function.
  799. This is only good if you just want to find out if the task is running.  I'm not
  800. sure how to find out how many copies are running, but if that's what you need,
  801. then I'm sure someone else can explain it to both of us.
  802. Excerpt from page 85 of "Mapping the Amiga"
  803. FindTask
  804. Description:    finds a task by name, or finds oneself
  805. Library:    exec.library
  806. Offset:        -$126
  807. Syntax:        task = FindTask(name)
  808. C:        struct Task *FindTask(STRPTR)
  809. ML:        d0 = FindTask(a1)
  810. Arguments:    name = name of the task to find; 0 to find oneself
  811. Result:        task = the task (or process) matching the name; zero if
  812. unsuccessful
  813. Later,
  814. Laura
  815.       \|/
  816.      (o O)
  817. ---oOO(_)OOo---
  818.   Peekaboo!!!
  819. @ENDNODE
  820. @NODE "Mail_28" " Re: Tasks "
  821. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  822. Date: 01-07-00 01:37:49
  823. Subject: @{b}Re: Tasks@{ub}
  824. Hi Laura,
  825. On 06-Jan-00 you wrote: Re: [amiga-c] Tasks
  826. >> Is this there a system friendly way of determining if a task
  827. >> pointer is still valid, without having to traverse the execbase
  828. >> lists?
  829. > I'm not sure exactly what you need it for, but I have a method to
  830. > check if a copy of my program is already running by using the
  831. > "FindTask()" function.
  832. I've already considered FindTask(), but it's not what I'm looking for.
  833. The main reason being - tasks names are not unique. A call to
  834. FindTask() only returns the first matching task pointer with that
  835. name.
  836. I'm writing a resource tracker (it's a personal debugging tool, much
  837. like SnoopDOS, but tracks resources through their allocated
  838. life-time) and I want to be able to store a task pointer, then check
  839. later to see if that same task is still running. Because task names
  840. are not unique, FindTask() isn't the best solution. Task pointers are
  841. the ideal solution. An exec function called IsTaskPtrValid() would
  842. have kept me happy. :-)
  843. > This is only good if you just want to find out if the task is
  844. > running. I'm not sure how to find out how many copies are running,
  845. > but if that's what you need, then I'm sure someone else can explain
  846. > it to both of us.
  847. The only way I can think of doing this, is to peek into execbase's
  848. task lists. This method isn't really system friendly since the exec
  849. lists are marked private.
  850. > Excerpt from page 85 of "Mapping the Amiga"
  851. > [snip]
  852. Thanks for your reply.
  853. Regards, Andrew Bell.
  854. +----------------------------------------+ 
  855. email: mailto:andrew.ab2000@bigfoot.com or
  856.        mailto:andrew@ab2000.prestel.co.uk
  857. web:   http://www2.prestel.co.uk/ab2000
  858. +----------------------------------------+
  859. That should clear out your sinuses.
  860. @ENDNODE
  861. @NODE "Mail_29" " Re: Re: Tasks "
  862. From: Duane McDonnell <dmcdonnell@primus.com.au>
  863. Date: 01-07-00 08:40:36
  864. Subject: @{b}Re: Re: Tasks@{ub}
  865. >>> Is this there a system friendly way of determining if a task
  866. >>> pointer is still valid, without having to traverse the execbase
  867. >>> lists?
  868. >> I'm not sure exactly what you need it for, but I have a method to
  869. >> check if a copy of my program is already running by using the
  870. >> "FindTask()" function.
  871. >I've already considered FindTask(), but it's not what I'm looking for.
  872. >The main reason being - tasks names are not unique. A call to
  873. >FindTask() only returns the first matching task pointer with that
  874. >name.
  875. >I'm writing a resource tracker (it's a personal debugging tool, much
  876. >like SnoopDOS, but tracks resources through their allocated
  877. >life-time) and I want to be able to store a task pointer, then check
  878. >later to see if that same task is still running. Because task names
  879. >are not unique, FindTask() isn't the best solution. Task pointers are
  880. >the ideal solution. An exec function called IsTaskPtrValid() would
  881. >have kept me happy. :-)
  882. You'll have to traverse Exec's task list as quickly as possible
  883. between a Forbid/Permit pair. I have a function I wrote in
  884. assembly to do this, it is my implementation of IsTaskPtrValid().
  885. I've been using it for years with no problems so I know that
  886. it's stable. I'll be happy to assemble the function as an object
  887. and provide you with a SAS/C calling prototype.
  888. >> This is only good if you just want to find out if the task is
  889. >> running. I'm not sure how to find out how many copies are running,
  890. >> but if that's what you need, then I'm sure someone else can explain
  891. >> it to both of us.
  892. >The only way I can think of doing this, is to peek into execbase's
  893. >task lists. This method isn't really system friendly since the exec
  894. >lists are marked private.
  895. You can't avoid this, you have to peek Exec's lists. Although
  896. they're marked private, *lots* of software does this. Provided
  897. you disable multi-tasking during list traversal (some people
  898. even use a Disable/Enable to be extra safe, but that's not
  899. really necessary) you're taking all the precautions you
  900. possibly can. This is one of those few cases where you need
  901. to toss the guidelines out the window because it's impossible
  902. to do it any other way. It may interest you to know that
  903. Carl Sassenrath released example code which did this too,
  904. so C= clearly intended this to be an exception to the rule.
  905. @ENDNODE
  906. @NODE "Mail_30" " Re: Re: Problems with active object... "
  907. From: "Andrzej J. Debicki" <denbi@softsystem.pl>
  908. Date: 01-07-00 09:03:09
  909. Subject: @{b}Re: Re: Problems with active object...@{ub}
  910. Hello Allan,
  911. Thursday, January 06, 2000, you wrote:
  912. > Clicking a stringgadget will always make it active. The same goes for
  913. > textfields (like TextEditor.mcc) -- I think NList has some weird thing about
  914. > going active or becoming 'default' when clicked, but you aren't using this,
  915. > right?
  916. Im using generic Listview object from MUI.
  917. > It's not a problem I've seen.  If you send the sources then we can probably
  918. > help you better.
  919. This is MyClass:
  920.   obj = (Object*)DoSuperNew(cl, obj,
  921.     MUIA_Group_Horiz, FALSE,
  922.       Child, VGroup,
  923.         Child, HGroup,
  924.           Child, popVolume = PopobjectObject,
  925.             ...
  926.             MUIA_Popobject_Object, lstPopVolume = ListviewObject,
  927.               ...
  928.               End, /* ListviewObject */
  929.             End, /*PopobjectObject */
  930.           End, /* HGroup */
  931.       Child, lstDirList = ListviewObject,
  932.         MUIA_CycleChain, 1,
  933.         MUIA_Listview_MultiSelect, MUIV_Listview_MultiSelect_Default,
  934.         MUIA_Listview_List, DirlistObject,
  935.           ...
  936.           End, /* DirListObject */
  937.         End, /* ListviewObject */
  938.        
  939.     TAG_MORE, msg->ops_AttrList);
  940. This is MainWnd:
  941.   obj = (Object*)DoSuperNew(cl, obj,
  942.     ...
  943.     WindowContents, VGroup,
  944.       Child, HGroup,
  945.         Child, PanelL = NewObject(CCPanel->mcc_Class, NULL, TAG_DONE),
  946.         Child, BalanceObject, End,
  947.         Child, PanelR = NewObject(CCPanel->mcc_Class, NULL, TAG_DONE),
  948.       End, /* HGroup */
  949.       Child, ColGroup(2),
  950.         Child, Label("CLI Command:"),
  951.         Child, strCommand = String("", 100),
  952.         End, /* ColGroup */
  953.       Child, HGroup,
  954.         MUIA_Group_Spacing, 0,
  955.         Child, btn1 = SimpleButton("Help"),
  956.         Child, btn2 = SimpleButton("F2"),
  957.         ...
  958.       End, /* HGroup */
  959.     End, /* VGroup */
  960.   TAG_MORE, msg->ops_AttrList);
  961. I need to perform some action when btn1 or btn2 is pressed. Data for
  962. the action is taken from active list view. But what to do when user
  963. click string object or popobject and then the button?
  964. >  Btw: You do know about the MUI@OneList.com list, right? :-)
  965. Ooopppsss... i forgot... :-) I sent the question to MUI on aachen.de
  966. but received no answer.
  967.  _       *       Andrzej J. Debicki       *   A12ooT  34MB
  968.  \\  _  *  PANS - Polish Amiga News Squad  *    6o3e/o6o
  969.   \\//  *       denbi@friko3.onet.pl       *   BVisionPPC
  970.    \/    *   http://republika.pl/denbi    *   AmigaOS  3.5
  971. -----------------------------------------------------------
  972. @ENDNODE
  973. @NODE "Mail_31" " Re: Re: Tasks "
  974. From: Duane McDonnell <dmcdonnell@primus.com.au>
  975. Date: 01-07-00 09:05:23
  976. Subject: @{b}Re: Re: Tasks@{ub}
  977. >I'm writing a resource tracker (it's a personal debugging tool, much
  978. >like SnoopDOS, but tracks resources through their allocated
  979. >life-time) and I want to be able to store a task pointer, then check
  980. >later to see if that same task is still running. Because task names
  981. >are not unique, FindTask() isn't the best solution. Task pointers are
  982. >the ideal solution. An exec function called IsTaskPtrValid() would
  983. >have kept me happy. :-)
  984. One final thing I forgot to mention, IsTaskPtrValid() is not
  985. by itself suitable for checking if a task which was known to be
  986. running at some time in the past is still running now, because
  987. it does not account for the possibility that a task was removed
  988. and a subsequent task was added at the same memory location.
  989. To solve this, you also need to account for the task name. To
  990. get a valid match, you need to match both the task name string
  991. (or hash key if you prefer) *and* the task address.
  992. @ENDNODE
  993. @NODE "Mail_32" " Re: Re: Tasks "
  994. From: Nicholas Clarke <nclarke@diku.dk>
  995. Date: 01-07-00 09:15:24
  996. Subject: @{b}Re: Re: Tasks@{ub}
  997. On Fri, 7 Jan 2000, Duane McDonnell wrote:
  998. > One final thing I forgot to mention, IsTaskPtrValid() is not
  999. > by itself suitable for checking if a task which was known to be
  1000. > running at some time in the past is still running now, because
  1001. > it does not account for the possibility that a task was removed
  1002. > and a subsequent task was added at the same memory location.
  1003. > To solve this, you also need to account for the task name. To
  1004. > get a valid match, you need to match both the task name string
  1005. > (or hash key if you prefer) *and* the task address.
  1006. Exec uses unique identifiers for each task. Wether they work is another
  1007. matter.
  1008. @ENDNODE
  1009. @NODE "Mail_33" " Re: Re: Tasks "
  1010. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1011. Date: 01-07-00 11:33:34
  1012. Subject: @{b}Re: Re: Tasks@{ub}
  1013. >On Fri, 7 Jan 2000, Duane McDonnell wrote:
  1014. >> One final thing I forgot to mention, IsTaskPtrValid() is not
  1015. >> by itself suitable for checking if a task which was known to be
  1016. >> running at some time in the past is still running now, because
  1017. >> it does not account for the possibility that a task was removed
  1018. >> and a subsequent task was added at the same memory location.
  1019. >> To solve this, you also need to account for the task name. To
  1020. >> get a valid match, you need to match both the task name string
  1021. >> (or hash key if you prefer) *and* the task address.
  1022. >Exec uses unique identifiers for each task. Wether they work is another
  1023. >matter.
  1024. Where's the task ID stored? I can't see it in the Task structure.
  1025. @ENDNODE
  1026. @NODE "Mail_34" " Re: Tasks "
  1027. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  1028. Date: 01-07-00 13:53:25
  1029. Subject: @{b}Re: Tasks@{ub}
  1030. Hi Duane,
  1031. On 07-Jan-00 you wrote: Re: [amiga-c] Re: Tasks
  1032. >> I'm writing a resource tracker (it's a personal debugging tool,
  1033. >> much like SnoopDOS, but tracks resources through their allocated
  1034. >> life-time) and I want to be able to store a task pointer, then
  1035. >> check later to see if that same task is still running. Because task
  1036. >> names are not unique, FindTask() isn't the best solution. Task
  1037. >> pointers are the ideal solution. An exec function called
  1038. >> IsTaskPtrValid() would have kept me happy. :-)
  1039. > One final thing I forgot to mention, IsTaskPtrValid() is not
  1040. > by itself suitable for checking if a task which was known to be
  1041. > running at some time in the past is still running now, because
  1042. > it does not account for the possibility that a task was removed
  1043. > and a subsequent task was added at the same memory location.
  1044. I know what you mean, I considered this myself. If a task is freed
  1045. then another one is created right after it, they *might* just share
  1046. the same task pointer.
  1047. > To solve this, you also need to account for the task name. To
  1048. > get a valid match, you need to match both the task name string
  1049. > (or hash key if you prefer) *and* the task address.
  1050. I'm already doing this, of course this wouldn't work 100% if a task
  1051. decided to modify it's ln_Name field. But it's probably the best
  1052. solution I have atm, even if it's a little hacky.
  1053. In your other post, you mentioned that Carl Sassenrath released some
  1054. example code, is this code on the Developer CD, do you know?
  1055. Thanks for your help.
  1056. Regards, Andrew Bell.
  1057. +----------------------------------------+ 
  1058. email: mailto:andrew.ab2000@bigfoot.com or
  1059.        mailto:andrew@ab2000.prestel.co.uk
  1060. web:   http://www2.prestel.co.uk/ab2000
  1061. +----------------------------------------+
  1062. My cat just loves to play Hide-And-Go-Puke!
  1063. @ENDNODE
  1064. @NODE "Mail_35" " Re: Quick Q about Palette gads "
  1065. From: Bob Lanham <bobl@jaxproductions.com>
  1066. Date: 01-07-00 14:17:37
  1067. Subject: @{b}Re: Quick Q about Palette gads@{ub}
  1068. > On Thu, 6 Jan 2000, Daithi O'Cuinn wrote:
  1069. > > I do only look for GadetUp...
  1070. > > I think it is a simpler problem that this - I get events from the gadget fine,
  1071. > > it's just that it does not  permanently show the currently selected entry (ie
  1072. > > the little 'paint pot' does not stay depressed).
  1073. > > That's why I think it's something as simple as a flag. Though you have given
  1074. > > me a clue - it could well be my IDCMP messages - I only ask for
  1075. > > IDCMP_CLOSEWINDOW | IDCMP_GADGETUP
  1076. > > Any one any ideas?
  1077. > > Regards
  1078. There is a good example of how to program the gadtools palette on
  1079. Aminet.  I tried it, and the paint buttons stay down when clicked. 
  1080. Search for GadgetTest.lha.
  1081. http://de.aminet.net/aminetbin/find?gadgettest
  1082. @ENDNODE
  1083. @NODE "Mail_36" " Re: Tasks "
  1084. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1085. Date: 01-07-00 16:02:44
  1086. Subject: @{b}Re: Tasks@{ub}
  1087. On Thu, 06-Jan-00, Laura Vance <vancel@amiga.nols.com> wrote:
  1088. >Excerpt from page 85 of "Mapping the Amiga"
  1089. >FindTask
  1090. >Description:finds a task by name, or finds oneself
  1091. >Library:exec.library
  1092. >Offset:-$126
  1093. >Syntax:task = FindTask(name)
  1094. >C:struct Task *FindTask(STRPTR)
  1095. >ML:d0 = FindTask(a1)
  1096. >Arguments:name = name of the task to find; 0 to find oneself
  1097. >Result:task = the task (or process) matching the name; zero if
  1098. >unsuccessful
  1099. Be careful using this book, it's littered with errors (eg: Move(),
  1100. ReadPixel(), RectFill(), Signal() and some of the structure
  1101. definitions). Use the AutoDocs if possible.
  1102. @ENDNODE
  1103. @NODE "Mail_37" " Re: Windows "
  1104. From: Tak Tang <Tak.Tang@suht.swest.nhs.uk>
  1105. Date: 01-07-00 17:33:33
  1106. Subject: @{b}Re: Windows@{ub}
  1107. OpenWindow() and OpenWindowTagList() DO open the window on return.  There are options which can make the window active or inactive when it opens, but you should be able to print intuitext to it immediately.  It might be a bug in your window class.
  1108. Tak Tang
  1109. Let the good times roll.
  1110. >>> Steffen <steffen.mars@stenloese.mail.telia.com> 06/01/2000 17:33:22 >>>
  1111. The following code works fine, printing 'word' across the window, but if i skip the window.Activate() (wich calls ActivateWindow();), i will receive no printing and the program eventually locks up, but the latter only occasionaly. I've come to the conclusion that the error occurs because the window is not physicly open, when i try to print to it, or receive messages (using WaitClose). Eventually, the activation of the window causes either a pause that allows intuition to 'really' open the window, or the call itself forces intuition to finish opening ?
  1112. So OpenWindow() does not ensure the window is actually open,  yes ?
  1113. And if yes, is calling ActivateWindow() (or specifying WA_Activate in taglist); the 'right' way to solve the problem ?
  1114. Thank you.
  1115. void main()
  1116.     {
  1117.     int    x;
  1118.     // OpenWindowTagList() is used to create a window for 'window'
  1119.     WinX    window("Test_Window",0,0,640,512);
  1120.     // This Creates an IntuiText derived object
  1121.     IWord    a_word("word"); 
  1122.     // Prog doesn't work if this line is skipped
  1123.     // It calls ActivateWindow();
  1124.     window.Activate(); 
  1125.     // Print the text across the screen
  1126.     // Uses PrintIText();
  1127.     for (x=0; x<256; x+=16) window.Print(a_word,x,x);
  1128.     window.WaitClose();
  1129.     }
  1130. @ENDNODE
  1131. @NODE "Mail_38" " Re: Re: Tasks "
  1132. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1133. Date: 01-07-00 18:34:09
  1134. Subject: @{b}Re: Re: Tasks@{ub}
  1135. >> To solve this, you also need to account for the task name. To
  1136. >> get a valid match, you need to match both the task name string
  1137. >> (or hash key if you prefer) *and* the task address.
  1138. >I'm already doing this, of course this wouldn't work 100% if a task
  1139. >decided to modify it's ln_Name field. But it's probably the best
  1140. >solution I have atm, even if it's a little hacky.
  1141. It is a bit of hack but that's unavoidable really since I'm
  1142. pretty sure Exec doesn't support task identification (someone
  1143. else said that it did, I could be wrong).
  1144. Even with checking both the name and address there is still the
  1145. remote possibility that you'll get an incorrect detection. A
  1146. full solution would probably involve patching AddTask() and
  1147. RemTask() to build your own task identification list (you'd
  1148. have to check that DOS functions like CreateProc() and
  1149. CreateNewProc() were being intercepted too, it's possible
  1150. they might not call the public Exec interface in all ROM
  1151. versions). Doing all this is almost certainly overkill
  1152. however, the chances of a bad detection using your current
  1153. solution would be extremely remote.
  1154. >In your other post, you mentioned that Carl Sassenrath released some
  1155. >example code, is this code on the Developer CD, do you know?
  1156. This is going back a long time so I'm not certain where I
  1157. saw this, however it may have been in his Guru's Guide book.
  1158. I no longer have a copy but I think the code is on Aminet.
  1159. The source to any "who" or "ps" type program will also be
  1160. good examples. If you can understand asm the source to Xoper
  1161. may be worth a look too.
  1162. @ENDNODE
  1163. @NODE "Mail_39" " Re: Quick Q about Palette gads "
  1164. From: Daithi O'Cuinn <docuinn@cluke.demon.co.uk>
  1165. Date: 01-07-00 21:25:18
  1166. Subject: @{b}Re: Quick Q about Palette gads@{ub}
  1167. Hello Bob
  1168. On 07-Jan-00, Bob Lanham wrote:
  1169. > There is a good example of how to program the gadtools palette on
  1170. > Aminet.  I tried it, and the paint buttons stay down when clicked. 
  1171. > Search for GadgetTest.lha.
  1172. Thanks, Bob, and to all else who replied. What I needed was indeed the
  1173. GTPA_IndicatorWidth tag. Oddly, though, it doesn't matter whether I set it to
  1174. 1 or 100, it still does the same thing visually. This doesn't matter, but I
  1175. am sort of wondering what on Earth the point of this tag is...
  1176. Regards
  1177. Daithi O'Cuinn
  1178. docuinn@cluke.demon.co.uk
  1179. @ENDNODE
  1180. @NODE "Mail_40" " Re: Windows "
  1181. From: Laura Vance <vancel@amiga.nols.com>
  1182. Date: 01-07-00 23:24:57
  1183. Subject: @{b}Re: Windows@{ub}
  1184. On Thu, 06 Jan 2000, you wrote:
  1185. > The following code works fine, printing 'word' across the window, but if i skip the window.Activate() (wich calls ActivateWindow();), i will receive no printing and the program eventually locks up, but the latter only occasionaly. I've come to the conclusion that the error occurs because the window is not physicly open, when i try to print to it, or receive messages (using WaitClose). Eventually, the activation of the window causes either a pause that allows intuition to 'really' open the window, or the call itself forces intuition to finish opening ?
  1186. > So OpenWindow() does not ensure the window is actually open,  yes ?
  1187. > And if yes, is calling ActivateWindow() (or specifying WA_Activate in taglist); the 'right' way to solve the problem ?
  1188. > Thank you.
  1189. It might help if you showed the class instead of the code, because this looks
  1190. like c++, and if you've defined your class right, then there shouldn't be a
  1191. problem with your code.  
  1192. Later,
  1193. Laura
  1194.       \|/
  1195.      (o O)
  1196. ---oOO(_)OOo---
  1197.   Peekaboo!!!
  1198. @ENDNODE
  1199. @NODE "Mail_41" " Re: Tasks "
  1200. From: Laura Vance <vancel@amiga.nols.com>
  1201. Date: 01-07-00 23:33:27
  1202. Subject: @{b}Re: Tasks@{ub}
  1203. On Fri, 07 Jan 2000, you wrote:
  1204. > On Thu, 06-Jan-00, Laura Vance <vancel@amiga.nols.com> wrote:
  1205. > >Excerpt from page 85 of "Mapping the Amiga"
  1206. > >FindTask
  1207. > >Description:finds a task by name, or finds oneself
  1208. > >Library:exec.library
  1209. > >Offset:-$126
  1210. > >Syntax:task = FindTask(name)
  1211. > >C:struct Task *FindTask(STRPTR)
  1212. > >ML:d0 = FindTask(a1)
  1213. > >Arguments:name = name of the task to find; 0 to find oneself
  1214. > >Result:task = the task (or process) matching the name; zero if
  1215. > >unsuccessful
  1216. > Be careful using this book, it's littered with errors (eg: Move(),
  1217. > ReadPixel(), RectFill(), Signal() and some of the structure
  1218. > definitions). Use the AutoDocs if possible.
  1219. That's funny, I've never had any problems with those functions when I used them
  1220. from that book.  The only one that I haven't used that you listed is Signal().
  1221. But I do always use more than one reference, because I've seen too many of them
  1222. that have problems.
  1223. Later,
  1224. Laura
  1225.       \|/
  1226.      (o O)
  1227. ---oOO(_)OOo---
  1228.   Peekaboo!!!
  1229. @ENDNODE
  1230. @NODE "Mail_42" " Re: Re: Tasks "
  1231. From: Nicholas Clarke <nclarke@diku.dk>
  1232. Date: 01-07-00 23:44:28
  1233. Subject: @{b}Re: Re: Tasks@{ub}
  1234. On Fri, 7 Jan 2000, Duane McDonnell wrote:
  1235. > >On Fri, 7 Jan 2000, Duane McDonnell wrote:
  1236. > >> One final thing I forgot to mention, IsTaskPtrValid() is not
  1237. > >> by itself suitable for checking if a task which was known to be
  1238. > >> running at some time in the past is still running now, because
  1239. > >> it does not account for the possibility that a task was removed
  1240. > >> and a subsequent task was added at the same memory location.
  1241. > >> 
  1242. > >> To solve this, you also need to account for the task name. To
  1243. > >> get a valid match, you need to match both the task name string
  1244. > >> (or hash key if you prefer) *and* the task address.
  1245. > >Exec uses unique identifiers for each task. Wether they work is another
  1246. > >matter.
  1247. > Where's the task ID stored? I can't see it in the Task structure.
  1248. Well I see you need the asm includes. Since they are more upto date.
  1249. ;* Pointer to an extended task structure.  This structure is allocated
  1250. ;* by V36 Exec if the proper flags in tc_ETaskFlags are set.  This
  1251. ;* field was formerly defined as:
  1252. ;*  UWORD TC_TRAPALLOC     ; traps allocated
  1253. ;*  UWORD TC_TRAPABLE     ; traps enabled
  1254. ;* Please see the Exec AllocTrap() and FreeTrap() calls.
  1255. ;Don't even _think_ about allocating one of these yourself.
  1256.  STRUCTURE ETask,MN_SIZE
  1257.   APTR et_Parent  ;Pointer to task (TC)
  1258.   ULONG et_UniqueID  ;ID unique to this task
  1259.   STRUCT et_Children,MLH_SIZE ;List of children
  1260.   UWORD et_TRAPALLOC
  1261.   UWORD et_TRAPABLE
  1262.   ULONG et_Result1  ;First result
  1263.   APTR et_Result2  ;Result data pointer (AllocVec)
  1264.   STRUCT et_TaskMsgPort,MP_SIZE
  1265.   LABEL ETask_SIZEOF ;_never_ depend on this size!
  1266. But I now see it depends on a flag.
  1267. @ENDNODE
  1268. @NODE "Mail_43" " Re: Windows "
  1269. From: Steffen <steffen.mars@stenloese.mail.telia.com>
  1270. Date: 01-08-00 05:42:53
  1271. Subject: @{b}Re: Windows@{ub}
  1272. From: Steffen <steffen.mars@stenloese.mail.telia.com>
  1273. I forgot to call the function that resets the IntuiText structure, when creating an IWord from a char* !!!
  1274. The funny thing is the program didn't work, until i inserted the Activate, and when i removed the line, it stoped working. It was merely a strange coincident.
  1275. Thanx still...
  1276. On 08-Jan-00, Laura Vance wrote:
  1277. > On Thu, 06 Jan 2000, you wrote:
  1278. >> The following code works fine, printing 'word' across the window, but if i skip the window.Activate() (wich calls ActivateWindow();), i will receive no printing and the program eventually locks up, but the latter only occasionaly. I've come to the conclusion that the error occurs because the window is not physicly open, when i try to print to it, or receive messages (using WaitClose). Eventually, the activation of the window causes either a pause that allows intuition to 'really' open the window, or the call itself forces intuition to finish opening ?
  1279. >> So OpenWindow() does not ensure the window is actually open,  yes ?
  1280. >> And if yes, is calling ActivateWindow() (or specifying WA_Activate in taglist); the 'right' way to solve the problem ?
  1281. >> Thank you.
  1282. > It might help if you showed the class instead of the code, because this looks
  1283. > like c++, and if you've defined your class right, then there shouldn't be a
  1284. > problem with your code.  
  1285. > -- 
  1286. > Later,
  1287. > Laura
  1288. @ENDNODE
  1289. @NODE "Mail_44" " Re: Windows "
  1290. From: Steffen <steffen.mars@stenloese.mail.telia.com>
  1291. Date: 01-08-00 05:44:30
  1292. Subject: @{b}Re: Windows@{ub}
  1293. From: Steffen <steffen.mars@stenloese.mail.telia.com>
  1294. Not window class, but IWord class (see other mail).
  1295. Thanx still...
  1296. On 07-Jan-00, Tak Tang wrote:
  1297. > OpenWindow() and OpenWindowTagList() DO open the window on return.  There are options which can make the window active or inactive when it opens, but you should be able to print intuitext to it immediately.  It might be a bug in your window class.
  1298. > Tak Tang
  1299. > Let the good times roll.
  1300. >>>> Steffen <steffen.mars@stenloese.mail.telia.com> 06/01/2000 17:33:22 >>>
  1301. > The following code works fine, printing 'word' across the window, but if i skip the window.Activate() (wich calls ActivateWindow();), i will receive no printing and the program eventually locks up, but the latter only occasionaly. I've come to the conclusion that the error occurs because the window is not physicly open, when i try to print to it, or receive messages (using WaitClose). Eventually, the activation of the window causes either a pause that allows intuition to 'really' open the window, or the call itself forces intuition to finish opening ?
  1302. > So OpenWindow() does not ensure the window is actually open,  yes ?
  1303. > And if yes, is calling ActivateWindow() (or specifying WA_Activate in taglist); the 'right' way to solve the problem ?
  1304. > Thank you.
  1305. > void main()
  1306. >    {
  1307. >    int    x;
  1308. >    // OpenWindowTagList() is used to create a window for 'window'
  1309. >    WinX    window("Test_Window",0,0,640,512);
  1310. >    // This Creates an IntuiText derived object
  1311. >    IWord    a_word("word"); 
  1312. >    
  1313. >    // Prog doesn't work if this line is skipped
  1314. >    // It calls ActivateWindow();
  1315. >    window.Activate(); 
  1316. >    // Print the text across the screen
  1317. >    // Uses PrintIText();
  1318. >    for (x=0; x<256; x+=16) window.Print(a_word,x,x);
  1319. >    
  1320. >    window.WaitClose();
  1321. >    }
  1322. > --------------------------- ONElist Sponsor ----------------------------
  1323. >  Hey Freelancers:  Find your next project through JobSwarm!  
  1324. >  You can even make money in your sleep by referring friends.
  1325. > <a href=" http://clickme.onelist.com/ad/jobswarm1 ">Click Here</a>
  1326. > ------------------------------------------------------------------------
  1327. >     -> Spread the URL: http://www.onelist.com/subscribe/amiga-c <- 
  1328. > **********************************************************************
  1329. > This email and any files transmitted with it are confidential and
  1330. > intended solely for the use of the individual or entity to whom they
  1331. > are addressed. If you have received this email in error please notify
  1332. > the system manager.
  1333. > This footnote also confirms that this email message has been swept by
  1334. > MIMEsweeper for the presence of computer viruses.
  1335. > **********************************************************************
  1336. > --------------------------- ONElist Sponsor ----------------------------
  1337. >  Hey Freelancers:  Find your next project through JobSwarm!  
  1338. >  You can even make money in your sleep by referring friends.
  1339. > <a href=" http://clickme.onelist.com/ad/jobswarm1 ">Click Here</a>
  1340. > ------------------------------------------------------------------------
  1341. >     -> Spread the URL: http://www.onelist.com/subscribe/amiga-c <- 
  1342. Regards
  1343. @ENDNODE
  1344. @NODE "Mail_45" " Re: Tasks "
  1345. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1346. Date: 01-08-00 10:09:10
  1347. Subject: @{b}Re: Tasks@{ub}
  1348. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1349. >On Fri, 07 Jan 2000, you wrote:
  1350. >> On Thu, 06-Jan-00, Laura Vance <vancel@amiga.nols.com> wrote:
  1351. >> >Excerpt from page 85 of "Mapping the Amiga"
  1352. >> >FindTask
  1353. >> >Description:finds a task by name, or finds oneself
  1354. >> >Library:exec.library
  1355. >> >Offset:-$126
  1356. >> >Syntax:task = FindTask(name)
  1357. >> >C:struct Task *FindTask(STRPTR)
  1358. >> >ML:d0 = FindTask(a1)
  1359. >> >Arguments:name = name of the task to find; 0 to find oneself
  1360. >> >Result:task = the task (or process) matching the name; zero if
  1361. >> >unsuccessful
  1362. >> Be careful using this book, it's littered with errors (eg: Move(),
  1363. >> ReadPixel(), RectFill(), Signal() and some of the structure
  1364. >> definitions). Use the AutoDocs if possible.
  1365. >That's funny, I've never had any problems with those functions when I used
  1366. >them
  1367. >from that book.  The only one that I haven't used that you listed is
  1368. Signal().
  1369. Compare the input registers for those functions with the ones listed
  1370. in the AutoDocs. If you're programming in C your prototypes/pragmas
  1371. will hide these errors, but if you do any assembly work the many
  1372. instances of incorrect registers will cause problems (if you're
  1373. lucky you'll get an immediate crash, otherwise the bug will lurk
  1374. in your code).
  1375. @ENDNODE
  1376. @NODE "Mail_46" " Re: Re: Tasks "
  1377. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1378. Date: 01-08-00 10:13:56
  1379. Subject: @{b}Re: Re: Tasks@{ub}
  1380. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1381. >> >Exec uses unique identifiers for each task. Wether they work is another
  1382. >> >matter.
  1383. >> Where's the task ID stored? I can't see it in the Task structure.
  1384. >Well I see you need the asm includes. Since they are more upto date.
  1385. Indeed, I checked the C includes.
  1386. [extended struct]
  1387. >But I now see it depends on a flag.
  1388. It would still be useful to compares IDs if they are available.
  1389. Thanks for pointing it out.
  1390. @ENDNODE
  1391. @NODE "Mail_47" " List Newbie + VBCC/BOOPSI questions "
  1392. From: "Sealey, M." <mws2@leicester.ac.uk>
  1393. Date: 01-10-00 11:41:52
  1394. Subject: @{b}List Newbie + VBCC/BOOPSI questions@{ub}
  1395. From: "Sealey, M." <mws2@leicester.ac.uk>
  1396. Hello! I'm new here, and I'd like to get
  1397. my first mail off to a flying start by asking
  1398. some REALLY nasty questions:
  1399. Are there any special considerations I need
  1400. to make to create BOOPSI classes in VBCC?
  1401. I'm currently writing some, but none of them
  1402. will work in class form due to some nasty
  1403. gurus in 'ramlib' (it's not a stack problem
  1404. in ramlib :) or in the task using the classes
  1405. itself.
  1406. I'm using a modified CLib37x to compile it
  1407. all, and as far as I can tell the code is
  1408. absolutely fine (I only get one warning, and
  1409. it's a harmless :) but I must be doing something
  1410. wrong somewhere.
  1411. So before I start throwing code around, I'm
  1412. just wondering if there are any special options
  1413. I need to specify to VBCC to make BOOPSI classes,
  1414. or compiler specific defines, etc..
  1415. (if you really want to know, I'm re-doing the
  1416. Reaction glyph.image to create a more pleasing
  1417. XEN-style look and add support for VisualPrefs'
  1418. through an internal API.. eventually ;)
  1419. Any help would be appreciated!
  1420. Matt Sealey mws2@le.ac.uk 
  1421. Distributed Systems Support
  1422. Computer Centre
  1423. University of Leicester
  1424. @ENDNODE
  1425. @NODE "Mail_48" " Re: Tasks "
  1426. From: Allan Odgaard <Duff@DIKU.DK>
  1427. Date: 01-12-00 04:07:36
  1428. Subject: @{b}Re: Tasks@{ub}
  1429. From: Allan Odgaard <Duff@DIKU.DK>
  1430. On 07-Jan-00, Andrew Bell wrote:
  1431. >> One final thing I forgot to mention, IsTaskPtrValid() is not
  1432. >> by itself suitable for checking if a task which was known to be
  1433. >> running at some time in the past is still running now [...]
  1434. > I know what you mean, I considered this myself. If a task is freed
  1435. > then another one is created right after it, they *might* just share
  1436. > the same task pointer.
  1437. In some contexts they are very likely to share the same address. E.g. if a
  1438. program periodically launches a sub-process to handle some calculations then
  1439. it's likely to get the same address if the rest of the system is 'resting'.
  1440. Regards Allan
  1441.      URL: http://www.DIKU.dk/students/duff/
  1442. WinErr 43e: Modem driver corrupt. Download latest version any try again.
  1443. @ENDNODE
  1444. @NODE "Mail_49" " Compiling for PPC "
  1445. From: Kim Sindalsen <sindalsen@yahoo.dk>
  1446. Date: 01-13-00 13:24:24
  1447. Subject: @{b}Compiling for PPC@{ub}
  1448. From: =?iso-8859-1?q?Kim=20Sindalsen?= <sindalsen@yahoo.dk>
  1449. This message wasn't meant to be posted here, but I've
  1450. suffered a HD-loss and means that many
  1451. e-mails+addresses has been lost, too.....
  1452. This message was originally intended for Raimund....
  1453. Now I've got cc1-exe and ixemul.library for PPC, next
  1454. step is to configure gcc (egcs) with
  1455. --target=ppc-amigaos, right ?? 
  1456. I asume that this means I have to d/l the egcs-source,
  1457. configure and then make it....... 
  1458. On the CD from phase5 supplied with my PPC-card I
  1459. found some GCC-includes.
  1460. I've also found a lib-file from Rask Ingemann
  1461. Lambertsen, should/could I use this ???
  1462. Regards, Kim.
  1463. ______________________________________________________
  1464. Do You Yahoo!?
  1465.  en gratis @yahoo.dk-adresse p
  1466.  http://mail.yahoo.dk
  1467. @ENDNODE
  1468. @NODE "Mail_50" " Re: Tasks "
  1469. From: Ilkka Lehtoranta <iti@solutions.fi>
  1470. Date: 01-13-00 13:30:57
  1471. Subject: @{b}Re: Tasks@{ub}
  1472. From: Ilkka Lehtoranta <iti@solutions.fi>
  1473. Hello Nicholas
  1474. On 08-Tam-00, you wrote:
  1475. NC>> Exec uses unique identifiers for each task. Wether they work is
  1476. NC>> another matter.
  1477. NC>> 
  1478. NC>> Where's the task ID stored? I can't see it in the Task structure.
  1479. NC> Well I see you need the asm includes. Since they are more upto date.
  1480. In addition, if you are using ASM includes from Developer CD 2.1 you
  1481. have to edit some files because they contain some errors...
  1482. @ENDNODE
  1483. @NODE "Mail_51" " Re: Tasks "
  1484. From: Tak Tang <Tak.Tang@suht.swest.nhs.uk>
  1485. Date: 01-13-00 15:21:28
  1486. Subject: @{b}Re: Tasks@{ub}
  1487. From: "Tak Tang" <Tak.Tang@suht.swest.nhs.uk>
  1488. You could also look at the segment list.  SegTracker (comes with mungwall or enforcer) might do some of what you are looking for.
  1489. Tak Tang
  1490. Let the good times roll.
  1491. **********************************************************************
  1492. This email and any files transmitted with it are confidential and
  1493. intended solely for the use of the individual or entity to whom they
  1494. are addressed. If you have received this email in error please notify
  1495. the system manager.
  1496. This footnote also confirms that this email message has been swept by
  1497. MIMEsweeper for the presence of computer viruses.
  1498. **********************************************************************
  1499. @ENDNODE
  1500. @NODE "Mail_52" " Re: Re: Tasks "
  1501. From: Olaf Barthel <olsen-amigac@sourcery.han.de>
  1502. Date: 01-13-00 16:12:03
  1503. Subject: @{b}Re: Re: Tasks@{ub}
  1504. From: "Olaf Barthel" <olsen-amigac@sourcery.han.de>
  1505. On Jan 13 Ilkka (Ilkka Lehtoranta) wrote:
  1506. > From: Ilkka Lehtoranta <iti@solutions.fi>
  1507. > Hello Nicholas
  1508. > On 08-Tam-00, you wrote:
  1509. > NC>> Exec uses unique identifiers for each task. Wether they work is
  1510. > NC>> another matter.
  1511. > NC>> 
  1512. > NC>> Where's the task ID stored? I can't see it in the Task structure.
  1513. > NC> 
  1514. > NC> Well I see you need the asm includes. Since they are more upto date.
  1515. > In addition, if you are using ASM includes from Developer CD 2.1 you
  1516. > have to edit some files because they contain some errors...
  1517.    Such as? I'd like to get them fixed, if possible.
  1518. Home: Olaf Barthel, Brabeckstrasse 35, D-30559 Hannover
  1519.  Net: olsen@sourcery.han.de (Home), olsen@logicalline.com (Work)
  1520. @ENDNODE
  1521. @NODE "Mail_53" " a2ixlibrary "
  1522. From: Joar Sivertsen <jsiv@start.no>
  1523. Date: 01-13-00 18:23:21
  1524. Subject: @{b}a2ixlibrary@{ub}
  1525. From: Joar Sivertsen <jsiv@start.no>
  1526. I'm having some troubles with .ixlibraries..
  1527. I've built the .a lib, which works just fine, then I ran a2ixlibrary to make
  1528. the .ixlibrary, but when an app tries to use the .ixlibrary, it (the app)
  1529. just crashes with a bus error :(
  1530. Anyone know why, or have any docs for a2ixlibrary, cos I couldnt find any..
  1531. @ENDNODE
  1532. @NODE "Mail_54" " pure programs "
  1533. From: Linus McCabe <sparkle@hehe.com>
  1534. Date: 01-13-00 22:06:52
  1535. Subject: @{b}pure programs@{ub}
  1536. From: Linus McCabe <sparkle@hehe.com>
  1537. I recently had to reinstall my entire system after a hdcrash.
  1538. At first everything (well, almost) worked fine but all of a sudden
  1539. 'assign' wasnt working properly anymore. If I tried to make an
  1540. 'assign xxx: dismount' nothing would happen; if I tried to make an
  1541. 'assign mui:libs/ add' the specified directory would not be added to
  1542. the libs: assign, but instead would the 'LIBS:' assign be renamed to
  1543. '.IBS:'. Wierdest thing. 
  1544. After a while I noticed that if I used c:assign instead of just
  1545. 'assign' everything worked, and I then took away the 'resident assign
  1546. pure' from the startup-sequence. Now it all works.
  1547. Now to my question. Did all this happen because assign is not really a
  1548. pure program, or what else could it be?
  1549. If a program is not pure, will it still work as a resident program if
  1550. its only run once at a time, or does that not matter?
  1551. and why did it work before?
  1552. /Linus
  1553. Linus McCabe * Sparkle@hehe.com              
  1554.              * Sparkle, #Amiga, DalNet
  1555.              * http://sparkle.amiga.tm
  1556. No one will believe it's the blues if you wear a suit, unless you
  1557. happen to be an old black man.
  1558. @ENDNODE
  1559. @NODE "Mail_55" " Re: a2ixlibrary "
  1560. From: Joar Sivertsen <jsiv@start.no>
  1561. Date: 01-13-00 22:18:54
  1562. Subject: @{b}Re: a2ixlibrary@{ub}
  1563. From: Joar Sivertsen <jsiv@start.no>
  1564. Hi Joar
  1565. On 13-Jan-00, you wrote:
  1566. > I'm having some troubles with .ixlibraries..
  1567. > I've built the .a lib, which works just fine, then I ran a2ixlibrary to
  1568. > make the .ixlibrary, but when an app tries to use the .ixlibrary, it (the
  1569. > app) just crashes with a bus error :(
  1570. > Anyone know why, or have any docs for a2ixlibrary, cos I couldnt find
  1571. > any..
  1572. Bah, never mind, found the docs ;)
  1573. Bit silly to only include them in the source archive, but oh well..
  1574. @ENDNODE
  1575. @NODE "Mail_56" " Re: Tasks "
  1576. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  1577. Date: 01-14-00 00:29:47
  1578. Subject: @{b}Re: Tasks@{ub}
  1579. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  1580. Hi Allan,
  1581. On 12-Jan-00 you wrote: [amiga-c] Re: Tasks
  1582. >>> One final thing I forgot to mention, IsTaskPtrValid() is not
  1583. >>> by itself suitable for checking if a task which was known to be
  1584. >>> running at some time in the past is still running now [...]
  1585. >> I know what you mean, I considered this myself. If a task is freed
  1586. >> then another one is created right after it, they *might* just share
  1587. >> the same task pointer.
  1588. > In some contexts they are very likely to share the same address.
  1589. > E.g. if a program periodically launches a sub-process to handle some
  1590. > calculations then it's likely to get the same address if the rest of
  1591. > the system is 'resting'.
  1592. I'll probably just write a patch for AddTask()/RemTask() that'll
  1593. ensure no two tasks will ever share the same task pointer, while my
  1594. program is running. :-)
  1595. Regards, Andrew Bell.
  1596. +----------------------------------------+ 
  1597. email: mailto:andrew.ab2000@bigfoot.com or
  1598.        mailto:andrew@ab2000.prestel.co.uk
  1599. web:   http://www2.prestel.co.uk/ab2000
  1600. +----------------------------------------+
  1601. I am Locutus of Borg: The color of your Poupon is irrelevant.
  1602. @ENDNODE
  1603. @NODE "Mail_57" " Re: Tasks "
  1604. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  1605. Date: 01-14-00 00:53:49
  1606. Subject: @{b}Re: Tasks@{ub}
  1607. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  1608. Hi Tak,
  1609. On 13-Jan-00 you wrote: [amiga-c] Re: Tasks
  1610. > You could also look at the segment list. SegTracker (comes with
  1611. > mungwall or enforcer) might do some of what you are looking for.
  1612. This only works if the process has a CLI structure (i.e. not started
  1613. from WB), even then, a Shell Process can have many segment lists
  1614. attached to it during it's life time (not at the same time though).
  1615. Plus the fact that some programs like to dettach themselves from CLI
  1616. by spawning a new process with the existing segment list and clearing
  1617. their cli_Module field before exiting the old process.
  1618. So the segment list wouldn't be a solid form of task identification.
  1619. Thanks for your suggestion anyway.
  1620. Regards, Andrew Bell.
  1621. +----------------------------------------+ 
  1622. email: mailto:andrew.ab2000@bigfoot.com or
  1623.        mailto:andrew@ab2000.prestel.co.uk
  1624. web:   http://www2.prestel.co.uk/ab2000
  1625. +----------------------------------------+
  1626. DS9 meets Moonbase Alpha: Odo + Maya = Love at first ooze.
  1627. @ENDNODE
  1628. @NODE "Mail_58" " Re: pure programs "
  1629. From: Linus McCabe <sparkle@hehe.com>
  1630. Date: 01-14-00 19:13:31
  1631. Subject: @{b}Re: pure programs@{ub}
  1632. From: Linus McCabe <sparkle@hehe.com>
  1633. Hello Duane
  1634. > Sounds like you lost the "P" attribute during the re-install.
  1635. OK, so specifying the p flag indicates that the program is not
  1636. reerntrant?
  1637. it doesent even matter that much, i dont need it residen.. But thansk
  1638. for the info!
  1639. /linus
  1640. > Check that C:Assign has the "P" attribute set. It should be set.
  1641. > Use "Protect C:Assign +P" to set it.  If Assign's flags are
  1642. > incorrect you might want to assume that other commands are
  1643. > also incorrect. When copying, you generally want to clone
  1644. > the file exactly, however many copy programs don't do this
  1645. > by default and some don't allow it all.
  1646. > --------------------------- ONElist Sponsor
  1647. > ----------------------------
  1648. >  Hey Freelancers:  Find your next project through JobSwarm!  
  1649. >  You can even make money in your sleep by referring friends.
  1650. > <a href=" http://clickme.onelist.com/ad/jobswarm1 ">Click Here</a>
  1651. ------------------------------------------------------------------------
  1652. >     -> Spread the URL: http://www.onelist.com/subscribe/amiga-c <- 
  1653. Linus McCabe * Sparkle@hehe.com              
  1654.              * Sparkle, #Amiga, DalNet
  1655.              * http://sparkle.amiga.tm
  1656. @ENDNODE
  1657. @NODE "Mail_59" " Re: Tasks "
  1658. From: Ilkka Lehtoranta <iti@solutions.fi>
  1659. Date: 01-14-00 22:13:09
  1660. Subject: @{b}Re: Tasks@{ub}
  1661. <<< No Message Collected >>>
  1662. @ENDNODE
  1663. @NODE "Mail_60" " Re: pure programs "
  1664. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1665. Date: 01-15-00 06:53:13
  1666. Subject: @{b}Re: pure programs@{ub}
  1667. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1668. >From: Linus McCabe <sparkle@hehe.com>
  1669. >I recently had to reinstall my entire system after a hdcrash.
  1670. >At first everything (well, almost) worked fine but all of a sudden
  1671. >'assign' wasnt working properly anymore. If I tried to make an
  1672. >'assign xxx: dismount' nothing would happen; if I tried to make an
  1673. >'assign mui:libs/ add' the specified directory would not be added to
  1674. >the libs: assign, but instead would the 'LIBS:' assign be renamed to
  1675. >'.IBS:'. Wierdest thing. 
  1676. >After a while I noticed that if I used c:assign instead of just
  1677. >'assign' everything worked, and I then took away the 'resident assign
  1678. >pure' from the startup-sequence. Now it all works.
  1679. >Now to my question. Did all this happen because assign is not really a
  1680. >pure program, or what else could it be?
  1681. It sounds like Assign is not re-entrant.
  1682. >If a program is not pure, will it still work as a resident program if
  1683. >its only run once at a time, or does that not matter?
  1684. It does matter, since variables won't be reset to the usual load
  1685. defaults when made resident. That would explain why C:Assign works
  1686. fine (it's loaded from disk/cache each time) but resident Assign
  1687. without the "P" attribute does not.
  1688. >and why did it work before?
  1689. Sounds like you lost the "P" attribute during the re-install.
  1690. Check that C:Assign has the "P" attribute set. It should be set.
  1691. Use "Protect C:Assign +P" to set it.  If Assign's flags are
  1692. incorrect you might want to assume that other commands are
  1693. also incorrect. When copying, you generally want to clone
  1694. the file exactly, however many copy programs don't do this
  1695. by default and some don't allow it all.
  1696. @ENDNODE
  1697. @NODE "Mail_61" " Re: Re: Tasks "
  1698. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1699. Date: 01-15-00 07:01:49
  1700. Subject: @{b}Re: Re: Tasks@{ub}
  1701. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1702. >From: Ilkka Lehtoranta <iti@solutions.fi>
  1703. >Hello Olaf
  1704. >On 13-Tam-00, you wrote:
  1705. >OB> From: "Olaf Barthel" <olsen-amigac@sourcery.han.de>
  1706. >OB> 
  1707. >OB> On Jan 13 Ilkka (Ilkka Lehtoranta) wrote:
  1708. >OB> 
  1709. >OB>> From: Ilkka Lehtoranta <iti@solutions.fi>
  1710. >OB>> 
  1711. >OB>> Hello Nicholas
  1712. >OB>> 
  1713. >OB>> On 08-Tam-00, you wrote:
  1714. >OB>> 
  1715. >OB>>>> Exec uses unique identifiers for each task. Wether they work is
  1716. >OB>>>> another matter.
  1717. >OB>>>> 
  1718. >OB>>>> Where's the task ID stored? I can't see it in the Task structure.
  1719. >OB>>> 
  1720. >OB>>> Well I see you need the asm includes. Since they are more upto
  1721. >OB>> date.
  1722. >OB>> 
  1723. >OB>> In addition, if you are using ASM includes from Developer CD 2.1 you
  1724. >OB>> have to edit some files because they contain some errors...
  1725. >OB> 
  1726. >OB>   Such as? I'd like to get them fixed, if possible.
  1727. >devices/printer.i and datatypes/pictureclass.i
  1728. >From printer.i:
  1729. > STRUCTURE  IODRPReq,IO_SIZE
  1730. >    APTR    io_RastPort    ; raster port
  1731. >    APTR    io_ColorMap    ; color map
  1732. >    ULONG   io_Modes       ; graphics viewport modes
  1733. >    UWORD   io_SrcX       ; source x origin
  1734. >    UWORD   io_SrcY       ; source y origin
  1735. >    UWORD   io_SrcWidth    ; source x width
  1736. >    UWORD   io_SrcHeight   ; source x height
  1737. >    LONG    io_DestCols    ; destination x width
  1738. >    LONG    io_DestRows    ; destination y height
  1739. >    UWORD   io_Special       ; option flags
  1740. >    LABEL   iodrpr_SIZEOF
  1741. > STRUCTURE  IODRPTagsReq,IO_SIZE
  1742. >    APTR    io_RastPort    ; raster port
  1743. >    APTR    io_ColorMap    ; color map
  1744. >    ULONG   io_Modes       ; graphics viewport modes
  1745. >    UWORD   io_SrcX       ; source x origin
  1746. >    UWORD   io_SrcY       ; source y origin
  1747. >    UWORD   io_SrcWidth    ; source x width
  1748. >    UWORD   io_SrcHeight   ; source x height
  1749. >    LONG    io_DestCols    ; destination x width
  1750. >    LONG    io_DestRows    ; destination y height
  1751. >    UWORD   io_Special       ; option flags
  1752. >    APTR    io_TagList       ; tag list
  1753. >    LABEL   iodrpr_SIZEOF
  1754. >In ASM you can't use symbol names twice.
  1755. A similar balls-up with es_SIZEOF caused me many hours of debugging
  1756. to track down.
  1757. @ENDNODE
  1758. @NODE "Mail_62" " Re: pure programs "
  1759. From: Linus McCabe <sparkle@hehe.com>
  1760. Date: 01-15-00 08:27:35
  1761. Subject: @{b}Re: pure programs@{ub}
  1762. From: Linus McCabe <sparkle@hehe.com>
  1763. On 16-Jan-00, Stephen Illingworth wrote:
  1764. > No, the opposite is true. The P attribute indicates that the program
  1765. > is re-entrant AND re-executable, a category the standard Assign
  1766. > program almost certainly finds itself in. Are you sure you're using
  1767. > the standard program and not a third-party replacement?
  1768. Yes, thats what I thought too and it makes more sence.. Its the assign
  1769. that came on my 3.0 disk.. odd, huh?
  1770. /Linus
  1771. Linus McCabe * Sparkle@hehe.com              
  1772.              * Sparkle, #Amiga, DalNet
  1773.              * http://sparkle.amiga.tm
  1774. One does not thank logic, Amanda
  1775. @ENDNODE
  1776. @NODE "Mail_63" " Re: pure programs "
  1777. From: Jonas Hulten <bjonte@hem.passagen.se>
  1778. Date: 01-15-00 09:40:17
  1779. Subject: @{b}Re: pure programs@{ub}
  1780. From: Jonas Hulten <bjonte@hem.passagen.se>
  1781. Den 13-Jan-00, skrev Linus McCabe:
  1782. > I recently had to reinstall my entire system after a hdcrash.
  1783. > At first everything (well, almost) worked fine but all of a sudden
  1784. > 'assign' wasnt working properly anymore. If I tried to make an
  1785. > 'assign xxx: dismount' nothing would happen; if I tried to make an
  1786. You didn't just want to REMOVE it? I rarely use DISMOUNT.
  1787. > 'assign mui:libs/ add' the specified directory would not be added to
  1788.          ^
  1789.          |
  1790. Forgot LIBS: here?
  1791. > the libs: assign, but instead would the 'LIBS:' assign be renamed to
  1792. > '.IBS:'. Wierdest thing. 
  1793. > After a while I noticed that if I used c:assign instead of just
  1794. > 'assign' everything worked, and I then took away the 'resident assign
  1795. > pure' from the startup-sequence. Now it all works.
  1796. > Now to my question. Did all this happen because assign is not really a
  1797. > pure program, or what else could it be?
  1798. I believe assign is a pure program. I use resident and it works.
  1799. > If a program is not pure, will it still work as a resident program if
  1800. > its only run once at a time, or does that not matter?
  1801. I think it will at least run once, then some data may have changed in memory
  1802. and some programs will not work twice. If they do work twice they may also
  1803. work more times. It will probably fail to run several times in parallel.
  1804. > and why did it work before?
  1805. Why didn't it work now is my question... Try to copy assign from the
  1806. workbench disks to make sure that it hasn't been trashed.
  1807. /Jonas
  1808. 0 "MEAT IS MURDER  " GRRRL
  1809. 48   "JETPAC"           PRG
  1810. 20   "JELLY MONSTERS"   PRG
  1811. 32   "
  1812. BEE"             REL
  1813. 42   "VECTREX"          REL
  1814. 604  "A4000"            L?<
  1815. 64 BLOCKS FREE.
  1816. @ENDNODE
  1817. @NODE "Mail_64" " Re: pure programs "
  1818. From: Stephen Illingworth <stevei@firewall.co.uk>
  1819. Date: 01-16-00 01:29:16
  1820. Subject: @{b}Re: pure programs@{ub}
  1821. From: Stephen Illingworth <stevei@firewall.co.uk>
  1822. Hello Linus
  1823. On 14-Jan-00, you wrote:
  1824. > From: Linus McCabe <sparkle@hehe.com>
  1825. > Hello Duane
  1826. >> Sounds like you lost the "P" attribute during the re-install.
  1827. > OK, so specifying the p flag indicates that the program is not
  1828. > reerntrant?
  1829. > it doesent even matter that much, i dont need it residen.. But thansk
  1830. > for the info!
  1831. No,  the  opposite  is true.  The P attribute indicates that the program is
  1832. re-entrant AND re-executable, a category the standard Assign program almost
  1833. certainly  finds itself in.  Are you sure you're using the standard program
  1834. and not a third-party replacement?
  1835. Steve.
  1836. @ENDNODE
  1837. @NODE "Mail_65" " Re: List Newbie + VBCC/BOOPSI questions "
  1838. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  1839. Date: 01-16-00 19:29:08
  1840. Subject: @{b}Re: List Newbie + VBCC/BOOPSI questions@{ub}
  1841. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  1842. Hello!
  1843. On 10-Jan-20000, you wrote:
  1844. > Are there any special considerations I need
  1845. > to make to create BOOPSI classes in VBCC?
  1846. Not to my knowledge, but then I have only recently started to write custom classes, so I can't offer any great big shiny pearls of wisdom. :)
  1847. A couple of pit-falls to watch out for are:
  1848. 1) Calls to printf() or puts() (debugging) in any dispatcher code.
  1849. 2) Forgetting to use HookEntry() or register arguments for the dispatcher.
  1850. > So before I start throwing code around
  1851. This might turn out to be your best option!
  1852. Kind regards
  1853. Nathan
  1854. @ENDNODE
  1855. @NODE "Mail_66" " Screen colors wrong "
  1856. From: Jack York <jyork@voyager.net>
  1857. Date: 01-16-00 20:05:11
  1858. Subject: @{b}Screen colors wrong@{ub}
  1859. From: Jack York <jyork@voyager.net>
  1860. Hello,
  1861. Please excuse me if this is not a subject for this list.  I
  1862. didn't know where else to ask for help.
  1863. I have a program written with ClassAct.  When I run it on OS 3.5
  1864. the colors are not correct.  Every line drawn on the screen is
  1865. black.  White isn't used at all.  It display fine under 3.1 and
  1866. I know it ran with 3.5 at one point because I posted a question
  1867. here about it losing memory when ran with 3.5.  The other 
  1868. programs I have that use ClassAct are the ClassAct demo, Thor
  1869. and Aweb and they all appear fine.  So...I must be doing 
  1870. something in my program to cause the colors to be incorrect.
  1871. I am using SA_FullPallete and SA_Colors but I tried removing them
  1872. and it didn't change anything.  I have installed a few utilities
  1873. but nothing that should affect this I don't think.  And even if 
  1874. they did, then the other programs should fail too.  This brings 
  1875. it back to something I am doing wrong in the program.  Any ideas?
  1876. @ENDNODE
  1877. @NODE "Mail_67" " Can somebody with OS35 do a test for me? "
  1878. From: Niels de Koning <ndk@bart.nl>
  1879. Date: 01-16-00 21:23:56
  1880. Subject: @{b}Can somebody with OS35 do a test for me?@{ub}
  1881. From: Niels de Koning <ndk@bart.nl>
  1882. Help!
  1883. I am having problems with my OS35 installation regarding datatypes!
  1884. Would somebody please be willing to help me by running a program and
  1885. telling me what happens on their OS35 system? If you think you have
  1886. correctly installed OS35 this test would not cost you more than
  1887. a minute (and probably less....)
  1888. If you want to help me I have to send you some testfiles, which are
  1889. about 50kb as lzx. I understand that you don't want to run programs
  1890. from somebody on the internet, so if you prefer I can send the source
  1891. as well, so you can compile it for yourself (SAS-C). Just let me know
  1892. what you prefer....
  1893. The program just loads a picture through the datatype system and 
  1894. outputs the picture in another format. btw, it is the program from a
  1895. picture datatype developer archive
  1896. My problem is that calling GetDTAttrs(...) with tag PDTA_BitMapHeader
  1897. does not give me a bitmapheader. If you want an (even more) detailed
  1898. description I can give you this as well.....
  1899. Kind regards,
  1900. //Niels de Koning
  1901.  ____________________________________________________________________
  1902.  Co-editor on 3DAddict's GFXZone               http://www.gfxzone.org
  1903. @ENDNODE
  1904. @NODE "Mail_68" " Re: pure programs "
  1905. From: Colin Wenzel <colstv@hotkey.net.au>
  1906. Date: 01-17-00 02:32:27
  1907. Subject: @{b}Re: pure programs@{ub}
  1908. From: Colin Wenzel <colstv@hotkey.net.au>
  1909. On 15-Jan-00, Jonas Hulten wrote:
  1910. -snip-
  1911. >> the libs: assign, but instead would the 'LIBS:' assign be renamed to
  1912. >> '.IBS:'. Wierdest thing. 
  1913. >> After a while I noticed that if I used c:assign instead of just
  1914. >> 'assign' everything worked, and I then took away the 'resident
  1915. >> assign pure' from the startup-sequence. Now it all works.
  1916. >> Now to my question. Did all this happen because assign is not really
  1917. >> a pure program, or what else could it be?
  1918. >> If a program is not pure, will it still work as a resident program
  1919. >> if its only run once at a time, or does that not matter?
  1920. >> and why did it work before?
  1921. You're seeing the effect, not the cause.
  1922. I bet you have some bad code somewhere & it's clobbering 
  1923. random memory.
  1924. I had something just like this happen to me with one of my programs.
  1925. Run Segtracker & Enforcer  (or cyber-thingy) from your Startup-sequence,
  1926. (just after setpatch)  & watch the fireworks......
  1927. Your system is probably partially already crippled before WB loads.  
  1928. -------------------------------------
  1929. Colin Wenzel. Australia.
  1930. EMAIL:  mailto:colstv@hotkey.net.au
  1931. URL:       http://www.hotkey.net.au/~colstv/
  1932. ICQ:       17608330
  1933. MADE WITH 'AMIGA' 4000T With O.S 3.1
  1934. ---------------------------------------
  1935. @ENDNODE
  1936. @NODE "Mail_69" " Re: Re: pure programs "
  1937. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1938. Date: 01-17-00 04:52:57
  1939. Subject: @{b}Re: Re: pure programs@{ub}
  1940. From: Duane McDonnell <dmcdonnell@primus.com.au>
  1941. >From: Linus McCabe <sparkle@hehe.com>
  1942. >On 16-Jan-00, Stephen Illingworth wrote:
  1943. >> No, the opposite is true. The P attribute indicates that the program
  1944. >> is re-entrant AND re-executable, a category the standard Assign
  1945. >> program almost certainly finds itself in. Are you sure you're using
  1946. >> the standard program and not a third-party replacement?
  1947. >Yes, thats what I thought too and it makes more sence..
  1948. Sorry, my reply could have given that impression. The P attribute
  1949. flags re-entrant/multi-thread compatible code. I was asking you
  1950. to set the bit if it wasn't already.
  1951. > Its the assign
  1952. >that came on my 3.0 disk.. odd, huh?
  1953. I think Colin's advice to run Enforcer early during bootup should
  1954. track down the problem. The standard Assign is pure and shouldn't
  1955. behave the way you describe. It's strange that this happens
  1956. consistently however, it doesn't sound like a completely random
  1957. effect.  Let us know if you track down the problem, I for one
  1958. would be interested to know how this happened.
  1959. @ENDNODE
  1960. @NODE "Mail_70" " RE: Re: List Newbie + VBCC/BOOPSI questions "
  1961. From: "Sealey, M." <mws2@leicester.ac.uk>
  1962. Date: 01-17-00 10:03:00
  1963. Subject: @{b}RE: Re: List Newbie + VBCC/BOOPSI questions@{ub}
  1964. From: "Sealey, M." <mws2@leicester.ac.uk>
  1965. > On 10-Jan-20000, you wrote:
  1966. > > Are there any special considerations I need
  1967. > > to make to create BOOPSI classes in VBCC?
  1968. > Not to my knowledge, but then I have only recently started to 
  1969. > write custom classes, so I can't offer any great big shiny 
  1970. > pearls of wisdom. :)
  1971. Doh! :)
  1972. > A couple of pit-falls to watch out for are:
  1973. > 1) Calls to printf() or puts() (debugging) in any
  1974. > dispatcher code.
  1975. I realise I can't do that. My main problem is in the library
  1976. init: I thought I solved a ramlib crash by fixing a tiny
  1977. typo in my code and then I started getting application
  1978. crashes - then when I fixed the application crashes (I
  1979. assigned SysBase to a NULL pointer.. oops ;) then I  got
  1980. the ramlib crash back.
  1981. Basically it's accessing memory from a NULL pointer somewhere,
  1982. and backing up $12e bytes before reading data out. Quite what
  1983. that value $12e means I don't know, all I do know is that the
  1984. address is gets back is that many bytes below the 4Gb boundary ;)
  1985. > 2) Forgetting to use HookEntry() or register arguments for 
  1986. > the dispatcher.
  1987. Oh. I've done all that. The dispatcher is fine, it's the
  1988. library init. I'm converting code from SAS/C into something
  1989. I can compile in VBCC, and every time I compile it, it bombs
  1990. > > So before I start throwing code around
  1991. > This might turn out to be your best option!
  1992. I don't know whether I should, it's not exactly the
  1993. sort of code I can start throwing onto mailing lists
  1994. (however mundane it is) because it's part of Reaction :)
  1995. Matt Sealey mws2@le.ac.uk 
  1996. Distributed Systems Support
  1997. Computer Centre
  1998. University of Leicester
  1999. @ENDNODE
  2000. @NODE "Mail_71" " HiSOFT C++ and MUI and Hooks... "
  2001. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2002. Date: 01-17-00 21:20:23
  2003. Subject: @{b}HiSOFT C++ and MUI and Hooks...@{ub}
  2004. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2005. Hiya,
  2006.    I am writing this MUI program, although this isn't really the problem. 
  2007. Doing the basic GUI etc works fine.
  2008.    However I'm having trouble doing hooks for things like a custom popup
  2009. object.
  2010.    As a starter for 10 I tried to compile the demo 'popup.c' but I get
  2011. 'Initialiser has invalid type' errors for the declarations of the Hook
  2012. structures.
  2013.    Has any one any example source that compiles with HSC++ on this?
  2014.    Any help appreciated, thanks.
  2015. Kind regards...
  2016. Cremlin Software - http://www.cremlinsoftware.org
  2017. Founder, lead programmer - ghandi@cremlinsoftware.org
  2018. Production, programmer - anj@cremlinsoftware.org
  2019. @ENDNODE
  2020. @NODE "Mail_72" " Re: List Newbie + VBCC/BOOPSI questions "
  2021. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  2022. Date: 01-17-00 22:33:49
  2023. Subject: @{b}Re: List Newbie + VBCC/BOOPSI questions@{ub}
  2024. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  2025. Hello!
  2026. On 10-Jan-20000, you wrote:
  2027. > Are there any special considerations I need
  2028. > to make to create BOOPSI classes in VBCC?
  2029. Not to my knowledge, but then I have only recently started to write custom classes, so I can't offer any great big shiny pearls of wisdom. :)
  2030. A couple of pit-falls to watch out for are:
  2031. 1) Calls to printf() or puts() (debugging) in any dispatcher code.
  2032. 2) Forgetting to use HookEntry() or register arguments for the dispatcher.
  2033. > So before I start throwing code around
  2034. This might turn out to be your best option!
  2035. Kind regards
  2036. Nathan
  2037. @ENDNODE
  2038. @NODE "Mail_73" " Re: HiSOFT C++ and MUI and Hooks... "
  2039. From: Allan Odgaard <Duff@DIKU.DK>
  2040. Date: 01-18-00 08:56:57
  2041. Subject: @{b}Re: HiSOFT C++ and MUI and Hooks...@{ub}
  2042. From: Allan Odgaard <Duff@DIKU.DK>
  2043. On 17-Jan-00, Alexander Niven-Jenkins wrote:
  2044. >   As a starter for 10 I tried to compile the demo 'popup.c' but I get
  2045. > 'Initialiser has invalid type' errors for the declarations of the Hook
  2046. > structures.
  2047. C++ has stronger typechecking, so here a hook structure must be initialized as:
  2048.   struct Hook hook = { { NULL, NULL }, (ULONG(*)())func, NULL, (APTR)udata };
  2049. You can also use the HOOKFUNC typedef from utility/hook.h, i.e.
  2050.   struct Hook hook = { { NULL, NULL }, (HOOKFUNC)func, NULL, (APTR)udata };
  2051. You can ommit the two last members, if you don't use the h_Data field.
  2052. Regards Allan
  2053.      URL: http://www.DIKU.dk/students/duff/
  2054. DOS Tip #17: Add DEVICE=FNGRCROS.SYS to CONFIG.SYS
  2055. @ENDNODE
  2056. @NODE "Mail_74" " Re: HiSOFT C++ and MUI and Hooks... "
  2057. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2058. Date: 01-18-00 22:14:06
  2059. Subject: @{b}Re: HiSOFT C++ and MUI and Hooks...@{ub}
  2060. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2061. Hiya Allan,
  2062. On 18-Jan-00, you wrote:
  2063. > C++ has stronger typechecking, so here a hook structure must be
  2064. > initialized as:
  2065. >  struct Hook hook = { { NULL, NULL }, (ULONG(*)())func, NULL, (APTR)udata
  2066. > You can also use the HOOKFUNC typedef from utility/hook.h, i.e.
  2067. >  struct Hook hook = { { NULL, NULL }, (HOOKFUNC)func, NULL, (APTR)udata
  2068.    I should have thought of this already as I have had to cast so much due
  2069. it's stricter requirements, just went over my head :-)
  2070.    Thanks.
  2071. Kind regards...
  2072. Cremlin Software - http://www.cremlinsoftware.org
  2073. Founder, lead programmer - ghandi@cremlinsoftware.org
  2074. Production, programmer - anj@cremlinsoftware.org
  2075. @ENDNODE
  2076. @NODE "Mail_75" " HiSOFT C++ and starting from WB... "
  2077. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2078. Date: 01-18-00 22:24:30
  2079. Subject: @{b}HiSOFT C++ and starting from WB...@{ub}
  2080. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2081. Hiya,
  2082.    This is probably specific to HiSOFT C++ (unfortuntely).
  2083.    My program runs either from CLI or WB, if run from the CLI it goes the
  2084. ReadArgs() way and if run from WB it opens the GUI.
  2085.    The problem is that if run from WB, I can't get it to output any startup
  2086. errors to the console (libraries failing to open etc).
  2087.    Once the GUI is up errors are displayed by a requester, so this isn't a
  2088. problem, it's solely errors which occur before the GUI is available.
  2089.    I've tried the simple route as in 'cout << blah' and every combination of
  2090. printf etc but to no joy, a console window doesn't open.
  2091.    Does anybody have any idea how to solve this?
  2092.    Unfortunately the wbstartup.h code only has german comments so it might
  2093. tell me in there but not knowing german I don't know (below is the bit) :-)
  2094.   #ifdef WBWINNAME
  2095.     // Ausgabe in Window umleiten:
  2096.     if(!freopen(WBWINNAME, "r+", stdout))
  2097.       return;
  2098.     // Eingabe aus selbem Window:
  2099.     stdin->Filehandle = stdout->Filehandle;  // THIS ASSIGNMENT WAS MADE
  2100.                           // BY TRAINED EXPERTS. DO NOT TRY THIS AT HOME!
  2101.   #endif
  2102. Kind regards...
  2103. Cremlin Software - http://www.cremlinsoftware.org
  2104. Founder, lead programmer - ghandi@cremlinsoftware.org
  2105. Production, programmer - anj@cremlinsoftware.org
  2106. @ENDNODE
  2107. @NODE "Mail_76" " HiSOFT C++ and starting from WB... "
  2108. From: Tak Tang <Tak.Tang@suht.swest.nhs.uk>
  2109. Date: 01-20-00 14:15:36
  2110. Subject: @{b}HiSOFT C++ and starting from WB...@{ub}
  2111. From: "Tak Tang" <Tak.Tang@suht.swest.nhs.uk>
  2112. I do not have any experience with Hisoft C++, but I would try opening CON as a file.
  2113. int main(int argc, char *argv[])
  2114.   FILE *myconfh;
  2115.   struct Library *IntuitionBase;
  2116.   myconfh = fopen("CON:Debug output/0/0/320/100", "w");
  2117. ... a check to make sure it opened OK
  2118.   IntuitionBase = OpenLibrary("intuition.library", 0L);
  2119.   if (!IntuitionBase)
  2120.     fprintf(myconfh,"Help!  Can not open intuition library!\n");
  2121. ... probably abort 
  2122. Tak Tang
  2123. Let the good times roll.
  2124. **********************************************************************
  2125. This email and any files transmitted with it are confidential and
  2126. intended solely for the use of the individual or entity to whom they
  2127. are addressed. If you have received this email in error please notify
  2128. the system manager.
  2129. This footnote also confirms that this email message has been swept by
  2130. MIMEsweeper for the presence of computer viruses.
  2131. **********************************************************************
  2132. @ENDNODE
  2133. @NODE "Mail_77" " Joysticks "
  2134. From: "Alastair M. Robinson" <blackfive@fakenhamweb.co.uk>
  2135. Date: 01-20-00 22:49:05
  2136. Subject: @{b}Joysticks@{ub}
  2137. From: "Alastair M. Robinson" <blackfive@fakenhamweb.co.uk>
  2138. Hi everyone,
  2139. I'm considering the possiblity of creating a new API for joysticks, since we
  2140. don't currently have anything which can abstract reading 4-player adapters,
  2141. megadrive controllers, four-player parallel-port adapters, etc. away from
  2142. the hardware.
  2143. Before I devote much time to this, does anyone know if anyone else is
  2144. already working on something along these lines?
  2145. I don't want to do this all by myself and then find it doesn't suit the
  2146. needs of others, so I want *input*!  If you're at all interested and have a
  2147. little spare bandwidth, mail me privately and I'll send you my preliminary
  2148. thoughts on the subject, and invite your comments/suggestions/help/routines/
  2149. whatever.
  2150. All the best,
  2151. Alastair M. Robinson, email:blackfive@fakenhamweb.co.uk
  2152. Amiga 4000/030, 18Meg RAM, 4.3Gig HD, Mustek ScanExpress 6000SP
  2153. C, Assembler (68k, PIC16C84, learning ATMEL AVR), PostScript,
  2154. ARexx, AMOSPro(!), AmigaDOS
  2155. "American Airlines. Fly with us and you won't walk again."
  2156.  -- Sign seen in L.A.
  2157. @ENDNODE
  2158. @NODE "Mail_78" " Re: HiSOFT C++ and starting from WB... "
  2159. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  2160. Date: 01-21-00 01:35:42
  2161. Subject: @{b}Re: HiSOFT C++ and starting from WB...@{ub}
  2162. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  2163. Hi Tak,
  2164. On 20-Jan-00 you wrote: [amiga-c] HiSOFT C++ and starting from WB...
  2165. > I do not have any experience with Hisoft C++, but I would try
  2166. > opening CON as a file.
  2167. Remember, you have two entry points with Hisoft C++. main() is called
  2168. when your program is started from Shell and wbmain() for Workbench.
  2169. This small example will allow you to print your debugging information
  2170. when started from Workbench (that is, if I haven't made any typos :-).
  2171. #include <exec/types.h>
  2172. #include <dos.h>
  2173. int main( void )
  2174.   BPTR FH;
  2175.   FH = Open("CON:0/11/640/120/Debug_window/CLOSE/WAIT", MODE_WRITE);
  2176.   if (FH)
  2177.     VFPrintf(FH, "Hello!\n"); 
  2178.     Close(FH);
  2179.   return 0;
  2180. int wbmain( void )
  2181.   return main();
  2182. Regards, Andrew Bell.
  2183. +----------------------------------------+ 
  2184. email: mailto:andrew.ab2000@bigfoot.com or
  2185.        mailto:andrew@ab2000.prestel.co.uk
  2186. web:   http://www2.prestel.co.uk/ab2000
  2187. +----------------------------------------+
  2188. Just paint your face in shadows dark.
  2189. @ENDNODE
  2190. @NODE "Mail_79" " How to print text fast? "
  2191. From: Allan Odgaard <Duff@DIKU.DK>
  2192. Date: 01-21-00 12:44:01
  2193. Subject: @{b}How to print text fast?@{ub}
  2194. From: Allan Odgaard <Duff@DIKU.DK>
  2195. Hi there,
  2196. Anybody experimented with fast ways to write text to the screen? I've created
  2197. my own set of text functions to do anti-alised text, but I'd love to see them
  2198. become faster, which is why I ask here for inspiration.
  2199. Currently I create each bitplane in an off-screen buffer (using the cpu) and
  2200. then I move these to the screen with BltTemplate().  The first procedure is
  2201. simply a (bit-wise) copy since I have each glyph separated in planes (each
  2202. plane being a colour, that way I can easily change the colour range used)
  2203. With this approach I can write ~3300 characters pr. second (16 levels of grey,
  2204. 14 pixels tall font (Arial), 040 @ 40MHz + PicassoIV) if I settle with 9
  2205. levels of grey than I can output twice as many characters, but there still is
  2206. a long way to go before the appearance of an entire page won't be crawling...
  2207. Regards Allan
  2208.      URL: http://www.DIKU.dk/students/duff/
  2209. Quoting one is plagiarism. Quoting many is research.
  2210. @ENDNODE
  2211. @NODE "Mail_80" " About CGI scripts in C++ and address correction. "
  2212. From: Dr Brain Damage <drbraindamage@angelfire.com>
  2213. Date: 01-21-00 16:52:02
  2214. Subject: @{b}About CGI scripts in C++ and address correction.@{ub}
  2215. From: "Dr Brain Damage" <drbraindamage@angelfire.com>
  2216. Does anyone know where to find instructions on how to do CGI-Scripts with C/C++?
  2217. i have tried to find it from net but because of my limited time on net, i havent been able to find anything.
  2218. Or could someone send me instructions on how to do CGI-Scripts with C++?
  2219. and for other thing.
  2220. i marketed you once about that free e-mail giver Planetlink.8k.com, how ever i putted wrong address.
  2221. i putted http://planetlinks.8k.com when its actually:
  2222. http://planetlink.8k.com
  2223. so no links but link.
  2224.           - Dr.BrainDamage
  2225. Angelfire for your free web-based e-mail. http://www.angelfire.com
  2226. @ENDNODE
  2227. @NODE "Mail_81" " Re: HiSOFT C++ and starting from WB... "
  2228. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2229. Date: 01-21-00 18:10:27
  2230. Subject: @{b}Re: HiSOFT C++ and starting from WB...@{ub}
  2231. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2232. Hiya Tak,
  2233. On 20-Jan-00, you wrote:
  2234. > I do not have any experience with Hisoft C++, but I would try opening CON
  2235. > as a file.
  2236.    Yep, thanks, I was forgetting you could do this :-)
  2237. Kind regards...
  2238. Cremlin Software - http://www.cremlinsoftware.org
  2239. Founder, lead programmer - ghandi@cremlinsoftware.org
  2240. Production, programmer - anj@cremlinsoftware.org
  2241. @ENDNODE
  2242. @NODE "Mail_82" " Re: How to print text fast? "
  2243. From: Duane McDonnell <dmcdonnell@primus.com.au>
  2244. Date: 01-21-00 18:54:21
  2245. Subject: @{b}Re: How to print text fast?@{ub}
  2246. From: Duane McDonnell <dmcdonnell@primus.com.au>
  2247. >From: Allan Odgaard <Duff@DIKU.DK>
  2248. >Hi there,
  2249. >Anybody experimented with fast ways to write text to the screen? I've created
  2250. >my own set of text functions to do anti-alised text, but I'd love to see them
  2251. >become faster, which is why I ask here for inspiration.
  2252. >Currently I create each bitplane in an off-screen buffer (using the cpu) and
  2253. Aren't the bitplanes pre-calculated?
  2254. >then I move these to the screen with BltTemplate().  The first procedure is
  2255. >simply a (bit-wise) copy since I have each glyph separated in planes (each
  2256. >plane being a colour, that way I can easily change the colour range used)
  2257. SetWriteMask() optimizations should be worthwhile for native chipset
  2258. displays.
  2259. >With this approach I can write ~3300 characters pr. second (16 levels of
  2260. grey,
  2261. >14 pixels tall font (Arial), 040 @ 40MHz + PicassoIV) if I settle with 9
  2262. >levels of grey than I can output twice as many characters,
  2263. I don't understand this part, since 9 and 14 grey levels imply the
  2264. same number of bitplanes so there should be no speed difference with
  2265. pre-calculated bitplanes. Are you doing realtime anti-aliasing?
  2266. > but there still is
  2267. >a long way to go before the appearance of an entire page won't be crawling...
  2268. If your primary target audience is gfx board users you might want to
  2269. experiment with chunky rendering. It's a bit fruitless trying to guage
  2270. the effectiveness of bitplane optimizations with RTG patches installed
  2271. so don't forget to test native performance too.
  2272. Cheers,
  2273. @ENDNODE
  2274. @NODE "Mail_83" " Re: How to print text fast? "
  2275. From: Duane McDonnell <dmcdonnell@primus.com.au>
  2276. Date: 01-21-00 19:03:47
  2277. Subject: @{b}Re: How to print text fast?@{ub}
  2278. From: Duane McDonnell <dmcdonnell@primus.com.au>
  2279. >From: Duane McDonnell <dmcdonnell@primus.com.au>
  2280. >>From: Allan Odgaard <Duff@DIKU.DK>
  2281. >>With this approach I can write ~3300 characters pr. second (16 levels of
  2282. >grey,
  2283. >>14 pixels tall font (Arial), 040 @ 40MHz + PicassoIV) if I settle with 9
  2284. >>levels of grey than I can output twice as many characters,
  2285. >I don't understand this part, since 9 and 14 grey levels imply the
  2286.                                           ^^ 16 even.
  2287.                                           
  2288. I should know better than to reply at 3 in the morning ;-)
  2289. @ENDNODE
  2290. @NODE "Mail_84" " Re: About CGI scripts in C++ and address correction. "
  2291. From: Allan Odgaard <Duff@DIKU.DK>
  2292. Date: 01-21-00 20:13:33
  2293. Subject: @{b}Re: About CGI scripts in C++ and address correction.@{ub}
  2294. From: Allan Odgaard <Duff@DIKU.DK>
  2295. On 21-Jan-00, Dr Brain Damage wrote:
  2296. > Does anyone know where to find instructions on how to do CGI-Scripts with
  2297. > C/C++?
  2298. AFAIK you read the potential arguments from stdin and output your generated
  2299. HTML page to stdout. But it depends a little on the http-server you're using.
  2300. Regards Allan
  2301.      URL: http://www.DIKU.dk/students/duff/
  2302. Reality is for people who lack imagination.
  2303. @ENDNODE
  2304. @NODE "Mail_85" " Re: How to print text fast? "
  2305. From: Allan Odgaard <Duff@DIKU.DK>
  2306. Date: 01-21-00 20:35:40
  2307. Subject: @{b}Re: How to print text fast?@{ub}
  2308. From: Allan Odgaard <Duff@DIKU.DK>
  2309. On 21-Jan-00, Duane McDonnell wrote:
  2310. >> Anybody experimented with fast ways to write text to the screen? I've
  2311. >> created my own set of text functions to do anti-alised text, but I'd love to
  2312. >> see them become faster, which is why I ask here for inspiration. Currently I
  2313. >> create each bitplane in an off-screen buffer (using the cpu) and
  2314. > Aren't the bitplanes pre-calculated?
  2315. Yes, for each glyph. The bitplane I create is for a complete string of text.
  2316. Which seemed to be faster to put together with the cpu than to blit every
  2317. character to the screen.
  2318. >> then I move these to the screen with BltTemplate().  The first procedure is
  2319. >> simply a (bit-wise) copy since I have each glyph separated in planes (each
  2320. >> plane being a colour, that way I can easily change the colour range used)
  2321. > SetWriteMask() optimizations should be worthwhile for native chipset
  2322. > displays.
  2323. I'm mainly targeting my efforts towards graphics cards.
  2324. >> With this approach I can write ~3300 characters pr. second (16 levels of
  2325. >> grey, 14 pixels tall font (Arial), 040 @ 40MHz + PicassoIV) if I settle
  2326. >> with 9 levels of grey than I can output twice as many characters,
  2327. > I don't understand this part, since 9 and 14 grey levels imply the
  2328. > same number of bitplanes so there should be no speed difference with
  2329. > pre-calculated bitplanes. Are you doing realtime anti-aliasing?
  2330. A bitplane refers only to a single colour, since they're used with
  2331. BltTemplate() -- so 16 levels of grey requires 16 'bitplanes' -- if I were to
  2332. pack together the planes then I wouldn't be able to change the pen values used
  2333. for the colour range, without actually remapping the bitplanes. And since the
  2334. text is printed on many different coloured backgrounds, that wouldn't be
  2335. feasible.
  2336. Btw: I did a few optimizations and compiled it with some better options.
  2337. So I can now do ~7800 letters pr. second. I estimate that I'd need to
  2338. do atleast 50.000 l/s before page-scroll isn't a pain... :-(
  2339. > If your primary target audience is gfx board users you might want to
  2340. > experiment with chunky rendering. It's a bit fruitless trying to guage
  2341. > the effectiveness of bitplane optimizations with RTG patches installed
  2342. > so don't forget to test native performance too.
  2343. I didn't look into assembling the entire bitmap in fast-ram, since I figured
  2344. that'd give me problems writting in JAM1-mode, but as I do know the background
  2345. (in most cases) then that's something I'll try :-)
  2346. But how do you recommend that I move my pixels to the gfx. card? Using
  2347. WritePixelArray8() will ensure AGA compatibility, but how fast is this on high
  2348. colour screens? Sometimes I get a feeling that if I were to output my gfx. in
  2349. the pixel-format used by the screen, I'd get a speedup. But since this
  2350. requires converting code on my part then I don't see why that should be any
  2351. faster than what's already in WritePixelArray() -- and I don't really want to
  2352. support 15+ different formats...
  2353. Regards Allan
  2354.      URL: http://www.DIKU.dk/students/duff/
  2355. Windows has found an unknown device and is installing a driver for it.
  2356. @ENDNODE
  2357. @NODE "Mail_86" " Re: How to print text fast? "
  2358. From: Allan Odgaard <Duff@DIKU.DK>
  2359. Date: 01-21-00 20:53:42
  2360. Subject: @{b}Re: How to print text fast?@{ub}
  2361. From: Allan Odgaard <Duff@DIKU.DK>
  2362. On 21-Jan-00, Allan Odgaard wrote:
  2363. > I didn't look into assembling the entire bitmap in fast-ram, since I figured
  2364. > that'd give me problems writting in JAM1-mode [...]
  2365. I just recalled that the other problem were that on high colour screens I only
  2366. allocate one exclusive pen, and change the colour of this after each blit, as
  2367. a 'fancy' document would otherwise drain the system for pens and/or give 
  2368. inexact results -- but for this family of screens I could probably calculate a
  2369. 24 bit buffer and use an RTG function to write it out to the gfx. card...
  2370. Regards Allan
  2371.      URL: http://www.DIKU.dk/students/duff/
  2372. WinErr 43e: Modem driver corrupt. Download latest version any try again.
  2373. @ENDNODE
  2374. @NODE "Mail_87" " Re: Re: About CGI scripts in C++ and address correction. "
  2375. From: Andrija Antonijevic <TheAntony2@bigfoot.com>
  2376. Date: 01-22-00 04:57:20
  2377. Subject: @{b}Re: Re: About CGI scripts in C++ and address correction.@{ub}
  2378. From: Andrija Antonijevic <TheAntony2@bigfoot.com>
  2379. History books say that Allan Odgaard spoke these words on 21-Jan-00 AD.
  2380. >On 21-Jan-00, Dr Brain Damage wrote:
  2381. >> Does anyone know where to find instructions on how to do CGI-Scripts with
  2382. >> C/C++?
  2383. >AFAIK you read the potential arguments from stdin and output your generated
  2384. >HTML page to stdout. But it depends a little on the http-server you're using.
  2385. Sorry I'm replying to your message, Allan, I missed the original one.
  2386. The most basic thing that will work is:
  2387. int main(void)
  2388.     printf("Content-type: text/plain\r\n");
  2389.     printf("Some-More-HTTP-Headers: blah-blah\r\n");
  2390.     printf("\r\n"); /* I have no more headers */
  2391.     printf("What you actually want to send here\n");
  2392.     exit(0); /* Or something else if something went wrong */
  2393. Basically, you are adding HTTP headers (such as Content-Type,
  2394. Content-Length or similar) and then the actual content (these two are
  2395. separated by a single "\r\n")
  2396. There are some ENV valiables that you might use (such as REMOTE_HOST,
  2397. REMOTE_ADDR), but you should check out
  2398. http://search.ietf.org/internet-drafts/draft-coar-cgi-v11-03.txt
  2399. which will tell you more about it...
  2400.      ///  /_\  _ _| |_ ___ _ _ _  _   http://www.bigfoot.com/~TheAntony
  2401. __  ///  / _ \| ' \  _/ _ \ ' \ || |   Amiga Translators' Organization
  2402. \\\///  /_/ \_\_||_\__\___/_||_\_, |        (*Serbian department*)
  2403.  \XX/  TheAntony@bigfoot.com   |__/              Team *AMIGA*
  2404. Let's organize this thing and take all the fun out of it.
  2405. @ENDNODE
  2406. @NODE "Mail_88" " Re: About CGI scripts in C++ and address correction. "
  2407. From: Allan Odgaard <Duff@DIKU.DK>
  2408. Date: 01-22-00 08:32:48
  2409. Subject: @{b}Re: About CGI scripts in C++ and address correction.@{ub}
  2410. From: Allan Odgaard <Duff@DIKU.DK>
  2411. On 22-Jan-00, Andrija Antonijevic wrote:
  2412. > Basically, you are adding HTTP headers (such as Content-Type,
  2413. > Content-Length or similar) and then the actual content (these two are
  2414. > separated by a single "\r\n")
  2415. And please add a date-header if your contents isn't too dynamic, as that'll
  2416. allow browsers to use the cached version rather than re-fetching it... the
  2417. various headers are described in RFC 2068 (HTTP\1.1)
  2418. Regards Allan
  2419.      URL: http://www.DIKU.dk/students/duff/
  2420. Have you crashed your Windows today?
  2421. @ENDNODE
  2422. @NODE "Mail_89" " Re: About CGI scripts in C++ and address correction. "
  2423. From: Duane McDonnell <dmcdonnell@primus.com.au>
  2424. Date: 01-22-00 09:02:31
  2425. Subject: @{b}Re: About CGI scripts in C++ and address correction.@{ub}
  2426. From: Duane McDonnell <dmcdonnell@primus.com.au>
  2427. >From: "Dr Brain Damage" <drbraindamage@angelfire.com>
  2428. >Does anyone know where to find instructions on how to do CGI-Scripts with
  2429. >C/C++?
  2430. If you need a practical example, here's some C source to a CGI script
  2431. which accepts parameters for generating tiling procedural textures.
  2432. It returns a HTML page to load and tile the JPEG format texture.
  2433. http://ncca.bournemouth.ac.uk/Staff/Willi/TextureMC/texmc.c
  2434. @ENDNODE
  2435. @NODE "Mail_90" " Re: About CGI scripts in C++ and address correction. "
  2436. From: Stephen Illingworth <stevei@firewall.co.uk>
  2437. Date: 01-22-00 11:44:04
  2438. Subject: @{b}Re: About CGI scripts in C++ and address correction.@{ub}
  2439. From: Stephen Illingworth <stevei@firewall.co.uk>
  2440. > From: "Dr Brain Damage" <drbraindamage@angelfire.com>
  2441. > Does anyone know where to find instructions on how to do CGI-Scripts with
  2442. > C/C++?
  2443. Have a look at the following, http://www.boutell.com/cgic/
  2444. Steve
  2445. @ENDNODE
  2446. @NODE "Mail_91" " Re: Re: How to print text fast? "
  2447. From: Duane McDonnell <dmcdonnell@primus.com.au>
  2448. Date: 01-22-00 12:55:22
  2449. Subject: @{b}Re: Re: How to print text fast?@{ub}
  2450. From: Duane McDonnell <dmcdonnell@primus.com.au>
  2451. >A bitplane refers only to a single colour, since they're used with
  2452. >BltTemplate() -- so 16 levels of grey requires 16 'bitplanes' -- if I were to
  2453. >pack together the planes then I wouldn't be able to change the pen values
  2454. >for the colour range, without actually remapping the bitplanes. And since the
  2455. >text is printed on many different coloured backgrounds, that wouldn't be
  2456. >feasible.
  2457. I see. I haven't used BltTemplate() before but it strikes me as
  2458. being a high overhead solution for this particular problem. Another
  2459. way to approach the problem might be to pre-calculate a font for each
  2460. color required (I imagine each font consists of a base color and the
  2461. anti-aliasing colors?) Depending upon your requirements, this might
  2462. be feasible memory wise. You can then blit directly in planar format.
  2463. >Btw: I did a few optimizations and compiled it with some better options.
  2464. >So I can now do ~7800 letters pr. second. I estimate that I'd need to
  2465. >do atleast 50.000 l/s before page-scroll isn't a pain... :-(
  2466. I think pre-calculation for each base color is the only way to achieve
  2467. this using a planar design, that or investigating a chunky approach.
  2468. >> If your primary target audience is gfx board users you might want to
  2469. >> experiment with chunky rendering. It's a bit fruitless trying to guage
  2470. >> the effectiveness of bitplane optimizations with RTG patches installed
  2471. >> so don't forget to test native performance too.
  2472. >I didn't look into assembling the entire bitmap in fast-ram, since I figured
  2473. >that'd give me problems writting in JAM1-mode, but as I do know the
  2474. background
  2475. >(in most cases) then that's something I'll try :-)
  2476. If you can build everything off-screen (including the background)
  2477. you can manage the logic operations yourself in your own optimized
  2478. manner. Then a simple copy to the destination (or dirty rectangles
  2479. for partial updates) will be sufficient.
  2480. >But how do you recommend that I move my pixels to the gfx. card? Using
  2481. >WritePixelArray8() will ensure AGA compatibility
  2482. Well, that's really the deciding factor, do you need native support?
  2483. If not, you could investigate using the RTG API functions directly
  2484. which are likely to be more optimized.
  2485. >, but how fast is this on high
  2486. >colour screens? Sometimes I get a feeling that if I were to output my gfx. in
  2487. >the pixel-format used by the screen, I'd get a speedup. But since this
  2488. >requires converting code on my part then I don't see why that should be any
  2489. >faster than what's already in WritePixelArray()
  2490. WritePixelArray8() is basically a chunky to planar converter so
  2491. I would expect this to be "reasonably fast" for RTG screens since
  2492. converting between different chunky formats is no where near as
  2493. complex as converting to planar format quickly. Experimentation
  2494. is obviously required, you might be pleasantly surprised (for
  2495. native displays, don't expect too much though :-)
  2496. > -- and I don't really want to
  2497. >support 15+ different formats...
  2498. Yes, that is a hassle. You should also check Aminet for other options,
  2499. you might find something already implemented which will make life
  2500. easier for you.
  2501. @ENDNODE
  2502. @NODE "Mail_92" " HiSOFT C++ and starting from WB... "
  2503. From: "Alastair M. Robinson" <blackfive@fakenhamweb.co.uk>
  2504. Date: 01-23-00 16:38:03
  2505. Subject: @{b}HiSOFT C++ and starting from WB...@{ub}
  2506. From: "Alastair M. Robinson" <blackfive@fakenhamweb.co.uk>
  2507. Hi Alex,
  2508. >    Unfortunately the wbstartup.h code only has german comments so it might
  2509. > tell me in there but not knowing german I don't know (below is the bit) :-)
  2510. Well, I don't know German, or C++, but I'll try to help anyway!
  2511. >  #ifdef WBWINNAME
  2512. >    // Ausgabe in Window umleiten:
  2513. >    if(!freopen(WBWINNAME, "r+", stdout))
  2514. >      return;
  2515. >    // Eingabe aus selbem Window:
  2516. >    stdin->Filehandle = stdout->Filehandle;  // THIS ASSIGNMENT WAS MADE
  2517. >                          // BY TRAINED EXPERTS. DO NOT TRY THIS AT HOME!
  2518. >  #endif
  2519. Right, as I understand it, this is slightly hacky code which redefines
  2520. stdin and stdout to a user-defined filename.  You need to do something like
  2521. this:
  2522. #define WBWINNAME "con:0/0/640/100/auto/close"
  2523. then #include the wbstartup code.  Since this file actually contributes
  2524. code rather than just definitions (when WBWINNAME is defined), it'll probably
  2525. have to be #included in main().  Then again, I'm thinking C, not C++ so I might
  2526. be wrong about this.
  2527. int main()
  2528.   #include <wbstartup.h>
  2529. This will redefine stdin/out even if started from the shell; if HiSoft c++
  2530. provides an alternate wbmain() entry, put the include file there instead. 
  2531. If not, depending on what else is in wbstartup.h, you might get away with
  2532. putting the include in a conditional, i.e
  2533.   if(WBenchMsg)  // or whatever it's called under HiSOFT c++
  2534.     #include <wbstartup.h>
  2535. All the best,
  2536. Alastair M. Robinson, email:blackfive@fakenhamweb.co.uk
  2537. Amiga 4000/030, 18Meg RAM, 4.3Gig HD, Mustek ScanExpress 6000SP
  2538. C, Assembler (68k, PIC16C84, learning ATMEL AVR), PostScript,
  2539. ARexx, AMOSPro(!), AmigaDOS
  2540. The warranty explicitly states that under NO circumstances shall a rocket
  2541. be returned to the manufacturer under its own power.
  2542. @ENDNODE
  2543. @NODE "Mail_93" " Re: psx controler help request. "
  2544. From: "William W. Toner II" <bill@prodatasys.com>
  2545. Date: 01-23-00 17:11:47
  2546. Subject: @{b}Re: psx controler help request.@{ub}
  2547. From: "William W. Toner II" <bill@prodatasys.com>
  2548. On 24-Jan-00, Kelly Samel wrote:
  2549. > From: Kelly Samel <samel@telusplanet.net>
  2550. > Hello Steven
  2551. > On 23-Jan-00, you wrote:
  2552. >> From: Steven Dobbs <steven.dobbs@cableinet.co.uk>
  2553. >> Hello,
  2554. >>    I was wondering and hoping if there is somebody out there who can
  2555. >> supply some example code for controling the playstation controllers,
  2556. >> inparticular, the analogue joypads and steering wheels.
  2557. > Why not contact the author of APPE?  He has produced an interface
  2558. > that allows the use of PlayStation controllers on any Amiga.  Just
  2559. > check out the archive APPE1_2.lha on aminet for more information.
  2560. > Hope that helps. ;)
  2561. I sent my money off to this guy 3 or 4 months ago at least. He said he was
  2562. going to send it out after I emailed a couple times, but have yet to see it.
  2563. Ended up ordering the PSXport from Blitersoft, and received it yesterday, and
  2564. seems to work quite well with Clickboom Quake, though I'm having problems
  2565. with ADoom. Also, stay away from the Mad Catz controller item code 8026. I
  2566. got this as I like the complete circle design diractional pads and the Sony
  2567. controllers have it split into 4 buttons which are torture onmy thumb. Went
  2568. out and got one of them today though, and it works fine. The Mad Catz one
  2569. doesn't want to work at all, though the designer, Joe Fenton, says he uses a
  2570. Mad Catz pad with no problems. It should see support in a Quake port and
  2571. Shogo from what I hear, and Joe said that ADoom PPC 1.4 uses it. And I
  2572. actually got it, which was nice. I wouldn't recommend the APPE at this point,
  2573. as I think I got ripped off. He had months head start on Blittersoft's
  2574. shipment, but the PSXport crossed the pond and went through customs already,
  2575. I don't see any reason to think the APPE I ordered will arrive anytime soon,
  2576. if ever. The PSXport disk does have developer stuff on it, so should suit
  2577. Bill Toner
  2578. bill@prodatasys.com
  2579. @ENDNODE
  2580. @NODE "Mail_94" " psx controler help request. "
  2581. From: Steven Dobbs <steven.dobbs@cableinet.co.uk>
  2582. Date: 01-23-00 22:19:59
  2583. Subject: @{b}psx controler help request.@{ub}
  2584. From: Steven Dobbs <steven.dobbs@cableinet.co.uk>
  2585. Hello,
  2586.     I was wondering and hoping if there is somebody out there who can supply
  2587. some example code for controling the playstation controllers, inparticular,
  2588. the analogue joypads and steering wheels.
  2589. Regards
  2590. Steven Dobbs
  2591. @ENDNODE
  2592. @NODE "Mail_95" " Re: psx controler help request. "
  2593. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2594. Date: 01-24-00 01:25:14
  2595. Subject: @{b}Re: psx controler help request.@{ub}
  2596. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2597. Hiya Steven,
  2598. On 23-Jan-00, you wrote:
  2599. >    I was wondering and hoping if there is somebody out there who can
  2600. > supply some example code for controling the playstation controllers,
  2601. > inparticular, the analogue joypads and steering wheels.
  2602.    If this is via the PSX then look at most PSX source sites there's loads,
  2603. even code for G-Con45 comptible guns.  If it's via a PC/Amiga, I don't
  2604. know, infact I don't even know the pin outs, I suspect someone like the
  2605. Bleem author would be best here.
  2606. Kind regards...
  2607. Cremlin Software - http://www.cremlinsoftware.org
  2608. Founder, lead programmer - ghandi@cremlinsoftware.org
  2609. Production, programmer - anj@cremlinsoftware.org
  2610. @ENDNODE
  2611. @NODE "Mail_96" " Re: psx controler help request. "
  2612. From: Kelly Samel <samel@telusplanet.net>
  2613. Date: 01-24-00 02:25:16
  2614. Subject: @{b}Re: psx controler help request.@{ub}
  2615. From: Kelly Samel <samel@telusplanet.net>
  2616. Hello Steven
  2617. On 23-Jan-00, you wrote:
  2618. > From: Steven Dobbs <steven.dobbs@cableinet.co.uk>
  2619. > Hello,
  2620. >    I was wondering and hoping if there is somebody out there who can
  2621. > supply some example code for controling the playstation controllers,
  2622. > inparticular, the analogue joypads and steering wheels.
  2623. Why not contact the author of APPE?  He has produced an interface
  2624. that allows the use of PlayStation controllers on any Amiga.  Just
  2625. check out the archive APPE1_2.lha on aminet for more information.
  2626. Hope that helps. ;)
  2627. @ENDNODE
  2628. @NODE "Mail_97" " should I make my config.library public ??? "
  2629. From: David Arbuthnot <Trebor@Digital.Prestel.co.uk>
  2630. Date: 01-24-00 15:59:03
  2631. Subject: @{b}should I make my config.library public ???@{ub}
  2632. From: David Arbuthnot <Trebor@Digital.Prestel.co.uk>
  2633. Hello,
  2634.   I am working on a library for my current project and I was wondering
  2635.   if anybody would be interested in using it within their programs. This
  2636.   library is responsible for management of configuration data within my 
  2637.   program it handles loading/saving of configuration data and stores the
  2638.   data until it is needed within my program however atm I am creating it
  2639.   in such a way that it will only recognise the config files that my program
  2640.   uses however my program uses standard iff files to store data so if 
  2641.   anybody is interested in using it I would like to know because I am
  2642.   currently writing the interface to the library (it uses boopsi classes)
  2643.   and I would design some sort of interface so that it could be used easily
  2644.   used as all the classes for handling my config files are built in to the 
  2645.   library atm so if you are interested please let me know.
  2646. Kind regards
  2647. Dave `Trebor' Arbuthnot
  2648. If I have the time to think why do I never have the time to do anything ???
  2649. -- David Arbuthnot
  2650. E-MAIL: Trabor@Digital.Prestel.co.uk
  2651. WWW   : http://www2.prestel.co.uk/Digital/
  2652. A1200, 6Mb RAM, 744Mb HD,GVP DSS8+ Sampler,HP Deskjet690C+
  2653. @ENDNODE
  2654. @NODE "Mail_98" " Re: should I make my config.library public ??? "
  2655. From: Christian Hattemer <Chris@heaven.riednet.wh.tu-darmstadt.de>
  2656. Date: 01-24-00 17:39:14
  2657. Subject: @{b}Re: should I make my config.library public ???@{ub}
  2658. From: Christian Hattemer <Chris@heaven.riednet.wh.tu-darmstadt.de>
  2659. On 24-Jan-00 David Arbuthnot wrote:
  2660. >  I am working on a library for my current project and I was wondering
  2661. >  if anybody would be interested in using it within their programs. This
  2662. >  library is responsible for management of configuration data within my 
  2663. >  program it handles loading/saving of configuration data and stores the
  2664. I'd be interested to have a look at it.
  2665. I use some code to handle an ASCII configfile. It's available as part of the
  2666. ML-Support source on Aminet. I also have an improved version with better
  2667. support for saving list contents, which is currently unreleased.
  2668. Bye, Chris
  2669.             __
  2670.            ///
  2671.       __  ///  Amiga 4000T 040/40      Team *AMIGA*
  2672.       \\\///
  2673.        \XX/    http://www.riednet.wh.tu-darmstadt.de/~chris/
  2674. Von der MIR wurden schon seit Tagen keine neuen Pannen mehr gemeldet.
  2675. Grund: Das Funkger
  2676. t ist kaputt...
  2677.                          (RTL Samstag Nacht)
  2678. @ENDNODE
  2679. @NODE "Mail_99" " Re: HiSOFT C++ and starting from WB... "
  2680. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2681. Date: 01-26-00 01:19:43
  2682. Subject: @{b}Re: HiSOFT C++ and starting from WB...@{ub}
  2683. From: Alexander Niven-Jenkins <anj@cremlinsoftware.org>
  2684. Hiya Alastair,
  2685. On 23-Jan-00, you wrote:
  2686. > Right, as I understand it, this is slightly hacky code which redefines
  2687. > stdin and stdout to a user-defined filename. You need to do something like
  2688. > this:
  2689. > #define WBWINNAME "con:0/0/640/100/auto/close"
  2690.    Thanks alot, this is exactly what I needed to know, due to the way HiSOFt
  2691. C++ works with dual entry points main() for CLI and wbmain() for wb, the
  2692. WBWINNAME only comes into affect if run from WB which is exactly what I
  2693. want.
  2694. Kind regards...
  2695. Cremlin Software - http://www.cremlinsoftware.org
  2696. Founder, lead programmer - ghandi@cremlinsoftware.org
  2697. Production, programmer - anj@cremlinsoftware.org
  2698. @ENDNODE
  2699. @NODE "Mail_100" " NewObject() from a seperate process??? "
  2700. From: David Arbuthnot <Trebor@Digital.Prestel.co.uk>
  2701. Date: 01-26-00 18:22:25
  2702. Subject: @{b}NewObject() from a seperate process???@{ub}
  2703. From: David Arbuthnot <Trebor@Digital.Prestel.co.uk>
  2704. Hello,
  2705.     I'm writing a library which requires a dos i/o which isn't a problem
  2706.     but as the dos process reads in the file can I use NewObject() on a 
  2707.     class that is stored in my library's base???
  2708. Kind regards
  2709. Dave `Trebor' Arbuthnot
  2710. If I have the time to think why do I never have the time to do anything ???
  2711. -- David Arbuthnot
  2712. E-MAIL: Trabor@Digital.Prestel.co.uk
  2713. WWW   : http://www2.prestel.co.uk/Digital/
  2714. A1200, 6Mb RAM, 744Mb HD,GVP DSS8+ Sampler,HP Deskjet690C+
  2715. @ENDNODE
  2716. @NODE "Mail_101" " Pattern dither in Adobe Photoshop, how and what? "
  2717. From: Allan Odgaard <Duff@DIKU.DK>
  2718. Date: 01-27-00 11:54:53
  2719. Subject: @{b}Pattern dither in Adobe Photoshop, how and what?@{ub}
  2720. From: Allan Odgaard <Duff@DIKU.DK>
  2721. Hi there,
  2722. A friend of mine told me that Adobe Photoshop had a dither setting called
  2723. 'pattern' and that this gave rather good results -- does anybody know the
  2724. technique behind this? I don't have PS (nor a PC) so I can't test it myself,
  2725. and I didn't find anything useful when using Google to search the net...
  2726. Thanks in advance, Allan.
  2727.      URL: http://www.DIKU.dk/students/duff/
  2728. Quoting one is plagiarism. Quoting many is research.
  2729. @ENDNODE
  2730. @NODE "Mail_102" " Pattern dither follow up. "
  2731. From: Allan Odgaard <Duff@DIKU.DK>
  2732. Date: 01-27-00 11:58:51
  2733. Subject: @{b}Pattern dither follow up.@{ub}
  2734. From: Allan Odgaard <Duff@DIKU.DK>
  2735. Just to avoid misunderstandings: My friend told me that it wasn't just ordered
  2736. dither with a new name.
  2737. @ENDNODE
  2738. @NODE "Mail_103" " Screensavers "
  2739. From: ddawn347@yahoo.com
  2740. Date: 01-27-00 18:38:07
  2741. Subject: @{b}Screensavers@{ub}
  2742. From: ddawn347@yahoo.com
  2743. Hi, all
  2744. First let me tell you, I'm not a computer programmer, but I have an idea for a
  2745. screensaver and I would like to create it. I
  2746. m not computer illiterate, if I
  2747. can learn to write a macro I can learn anything (right?) of course. 
  2748. Is there a program I can use to teach me how to program a screensaver?  Or
  2749. maybe there
  2750. s a class I can take to learn how to write a screensaver?  Any 
  2751. advice would be highly appreciated
  2752.  Thanks
  2753. @ENDNODE
  2754. @NODE "Mail_104" " Begginners-question regarding memory allocation "
  2755. From: Stephan Huebner <StephanHuebner@swol.de>
  2756. Date: 01-28-00 14:25:42
  2757. Subject: @{b}Begginners-question regarding memory allocation@{ub}
  2758. From: Stephan Huebner <StephanHuebner@swol.de>
  2759. Hello experts :),
  2760. upto now I only used Blitzbasic and arexx for programming purposes. So
  2761. memory allocation is something I didn't have to use. And that's my first
  2762. question: Is it absolutely necessary to use memory allocation, for example
  2763. if I want to make a database. I see the advantage that I can allocate the
  2764. memory dynamically, but what other advantages are there? Wouldn't it be
  2765. enough the do a structure of a database an array/pointers of it?
  2766. And, how do I have to do the memory allocation? I mean, If I have an array,
  2767. getting the different fields is clear, but if I allocate memory each time
  2768. new data is entered, I also have to have a name for the allocated
  2769. memory-part. But how can I have a different name each time and also can do
  2770. it with a general function? Wouldn't I have to have some kind of array
  2771. again?
  2772. Sorry, if these are some silly questions, but  I am completely lost at the
  2773. moment... :-/
  2774. Greetings,
  2775. Stephan Huebner
  2776. Love: The decision to accept the whole of someone, regardless the details
  2777. -- Otto Flake
  2778. @ENDNODE
  2779. @NODE "Mail_105" " Re: Begginners-question regarding memory allocation "
  2780. From: Christian Hattemer <Chris@heaven.riednet.wh.tu-darmstadt.de>
  2781. Date: 01-28-00 15:33:06
  2782. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  2783. From: Christian Hattemer <Chris@heaven.riednet.wh.tu-darmstadt.de>
  2784. On 28-Jan-00 Stephan Huebner wrote:
  2785. > question: Is it absolutely necessary to use memory allocation, for example
  2786. > if I want to make a database. I see the advantage that I can allocate the
  2787. > memory dynamically, but what other advantages are there? Wouldn't it be
  2788. > enough the do a structure of a database an array/pointers of it?
  2789. You need to do it dynamically. Otherwise you would be stuck with a fixed
  2790. size of the database. The database would always take up memory for the whole
  2791. size, even if there's only one entry. And when the database is full you
  2792. wouldn't be able to add another record without recompiling the program.
  2793. > And, how do I have to do the memory allocation? I mean, If I have an
  2794. > array, getting the different fields is clear, but if I allocate memory
  2795. > each time new data is entered, I also have to have a name for the
  2796. > allocated memory-part. But how can I have a different name each time and
  2797. > also can do it with a general function? Wouldn't I have to have some kind
  2798. > of array again?
  2799. Each time you add a record you allocate memory for the size of one record.
  2800. You'll get a new memory area each time you do that, at least until the
  2801. memory ist full... Of course you need to track where your records are in
  2802. memory, to be able to access and free them on exit of your program.
  2803. Bye, Chris
  2804.             __
  2805.            ///
  2806.       __  ///  Amiga 4000T 040/40      Team *AMIGA*
  2807.       \\\///
  2808.        \XX/    http://www.riednet.wh.tu-darmstadt.de/~chris/
  2809. sar machte das Lager voll und jeder stand bei seinem Haufen
  2810. @ENDNODE
  2811. @NODE "Mail_106" " Bad Link Library "
  2812. From: David Arbuthnot <Trebor@Digital.Prestel.co.uk>
  2813. Date: 01-28-00 17:11:50
  2814. Subject: @{b}Bad Link Library@{ub}
  2815. From: David Arbuthnot <Trebor@Digital.Prestel.co.uk>
  2816. Hello,
  2817.     I recently created a shared library and then I decided to add the
  2818. autoinit capabilities of Dice to it in the form of a link library (which
  2819. contains a VarArgs stub to one of the calls in the library) but when I
  2820. compiled a test program and linked it with the link lib everything was fine
  2821. until the program was about to finish when a 0x0100000F recoverable alert
  2822. popped up which indicates a bad FreeMem call however the call that causes
  2823. the alert does not use freemem at all and I can't figure out whats wrong. I
  2824. used Dice to compile the example and the fdtolib tool that comes with dice
  2825. to generate the autoinit stuff and the DMakeFile which I used came from the
  2826. WBStart source codes. Also I have compiled a working test program that
  2827. doesn't use the link lib which indicates that the link lib is at fault
  2828. Kind regards
  2829. Dave `Trebor' Arbuthnot
  2830. If I have the time to think why do I never have the time to do anything ???
  2831. -- David Arbuthnot
  2832. E-MAIL: Trabor@Digital.Prestel.co.uk
  2833. WWW   : http://www2.prestel.co.uk/Digital/
  2834. A1200, 6Mb RAM, 744Mb HD,GVP DSS8+ Sampler,HP Deskjet690C+
  2835. @ENDNODE
  2836. @NODE "Mail_107" " Re: Begginners-question regarding memory allocation "
  2837. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  2838. Date: 01-28-00 19:35:00
  2839. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  2840. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  2841. Hello Christian
  2842. On 28-Jan-00, you wrote:
  2843. > From: Christian Hattemer <Chris@heaven.riednet.wh.tu-darmstadt.de>
  2844. > On 28-Jan-00 Stephan Huebner wrote:
  2845. >> question: Is it absolutely necessary to use memory allocation, for
  2846. >> example if I want to make a database. I see the advantage that I can
  2847. >> allocate the memory dynamically, but what other advantages are there?
  2848. >> Wouldn't it be enough the do a structure of a database an array/pointers
  2849. >> of it?
  2850. > You need to do it dynamically. Otherwise you would be stuck with a fixed
  2851. > size of the database. The database would always take up memory for the
  2852. > whole size, even if there's only one entry. And when the database is full
  2853. > you wouldn't be able to add another record without recompiling the
  2854. > program.
  2855. >> And, how do I have to do the memory allocation? I mean, If I have an
  2856. >> array, getting the different fields is clear, but if I allocate memory
  2857. >> each time new data is entered, I also have to have a name for the
  2858. >> allocated memory-part. But how can I have a different name each time and
  2859. >> also can do it with a general function? Wouldn't I have to have some kind
  2860. >> of array again?
  2861. > Each time you add a record you allocate memory for the size of one record.
  2862. > You'll get a new memory area each time you do that, at least until the
  2863. > memory ist full... Of course you need to track where your records are in
  2864. > memory, to be able to access and free them on exit of your program.
  2865. Dont be using arrays anyway,  Use Amiga List  structures, It is then easier
  2866. to keep track of
  2867. allocated memory areas, and then free them.
  2868. > Bye, Chris
  2869. Regards
  2870. @ENDNODE
  2871. @NODE "Mail_108" " Re: Begginners-question regarding memory allocation "
  2872. From: Tim Hanson <msinister@connectfree.co.uk>
  2873. Date: 01-28-00 20:23:30
  2874. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  2875. From: Tim Hanson <msinister@connectfree.co.uk>
  2876. Hi Stephan 
  2877. Stephan Huebner wrote this on 28-Jan-00 at 14:25:42
  2878. > And, how do I have to do the memory allocation? I mean, If I have an array,
  2879. > getting the different fields is clear, but if I allocate memory each time
  2880. > new data is entered, I also have to have a name for the allocated
  2881. > memory-part. But how can I have a different name each time and also can do
  2882. > it with a general function? Wouldn't I have to have some kind of array
  2883. > again?
  2884. Your best bet is to use a linked list. Check out the docs for NewList()
  2885. AddHead() RemHead() Remove() Enqueue() etc. and use a structure like this:
  2886. struct record
  2887.  struct Node mynode;
  2888.  char somedata[100];
  2889.  int moredata;
  2890. which can be cast as a struct Node * and given to the above functions.
  2891. Or use a structure like this:
  2892. struct record
  2893.  struct record *next;
  2894.  struct record *prev;
  2895.  char somedata[100];
  2896. }recordList;
  2897. and do the linking yourself. eg:
  2898. struct record *allocRecord()
  2899. struct record *recordPtr;
  2900.  recordPtr=AllocVec(sizeof(struct record),MEMF_ANY);
  2901.  struct record *tempRecPtr;
  2902.   tempRecPtr=recordList.next;
  2903.   recordPtr->prev=&recordList;
  2904.   recordList.next=recordPtr;
  2905.   recordPtr->next=tempRecPtr;
  2906. return recordPtr;
  2907. NOTE: This code is awful. It should have error checking and it assumes that
  2908. you have initialised recordList to zero.
  2909. You can then walk the list with this.
  2910. recordPtr=&recordList.next;
  2911. while(recordPtr)
  2912.         {
  2913.          do stuff...
  2914.          recordPtr=recordPtr->next;
  2915.         }
  2916. BTW pointers are the quickest way to crash you machine. Use with care. It
  2917. wouldn`t suprise me if someone points out a grievous error in this code as I
  2918. havn`t double checked it and it`s very easy to make mistakes.
  2919.       
  2920. Tim Hanson,
  2921. by the River,Canterbury, Kent.
  2922. Amiga A1200T,`040/25,603e/160,32MB Fast,BVisionPPC,
  2923. 170MB IDE HD,ZIP SCSI,RENO x2CD SCSI,Pace 56K
  2924. Don`t waste  your time by visiting
  2925. http://www.sinister67.freeserve.co.uk
  2926. @ENDNODE
  2927. @NODE "Mail_109" " Re: Begginners-question regarding memory allocation "
  2928. From: Stephan Huebner <StephanHuebner@swol.de>
  2929. Date: 01-28-00 23:01:09
  2930. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  2931. From: Stephan Huebner <StephanHuebner@swol.de>
  2932. Hello Christian
  2933. On 28-Jan-00, you wrote:
  2934. >> question: Is it absolutely necessary to use memory allocation, for
  2935. >> example if I want to make a database. I see the advantage that I can
  2936. >> allocate the memory dynamically, but what other advantages are there?
  2937. >> Wouldn't it be enough the do a structure of a database an array/pointers
  2938. >> of it?
  2939. > You need to do it dynamically. Otherwise you would be stuck with a fixed
  2940. > size of the database. The database would always take up memory for the
  2941. > whole size, even if there's only one entry. And when the database is full
  2942. > you wouldn't be able to add another record without recompiling the
  2943. > program.
  2944. As I said, silly question. I should have known that myself... :-/
  2945. > Each time you add a record you allocate memory for the size of one record.
  2946. > You'll get a new memory area each time you do that, at least until the
  2947. > memory ist full... Of course you need to track where your records are in
  2948. > memory, to be able to access and free them on exit of your program.
  2949. Yeah, but I think I will need some kind of "identifier" for each piece of
  2950. memory.But Tim Hanson has kindly written some code-lines, will have a
  2951. deeper look on that and see if it solves the problem...
  2952. Greetings,
  2953. Stephan
  2954. shape: something which everyone has, but which looks better on young women
  2955. -- Anonymous
  2956. @ENDNODE
  2957. @NODE "Mail_110" " Re: Begginners-question regarding memory allocation "
  2958. From: Stephan Huebner <StephanHuebner@swol.de>
  2959. Date: 01-28-00 23:06:01
  2960. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  2961. From: Stephan Huebner <StephanHuebner@swol.de>
  2962. Hello Tim
  2963. On 28-Jan-00, you wrote:
  2964. > Your best bet is to use a linked list. Check out the docs for NewList()
  2965. > AddHead() RemHead() Remove() Enqueue() etc. and use a structure like this:
  2966. [snip]
  2967. Thanks! Looks interesting, I think I am beginning to understand how those
  2968. things can work.
  2969. > BTW pointers are the quickest way to crash you machine.
  2970. As if I wouldn't know that. :) When I started learning ansi-C, pointers made
  2971. me mad! :-/
  2972. > Use with care. It
  2973. > wouldn`t suprise me if someone points out a grievous error in this code as
  2974. > I havn`t double checked it and it`s very easy to make mistakes.
  2975. If I could I would shoot the guy who invented pointers! ;-)
  2976. Greetings,
  2977. Stephan
  2978. Friendship: to listen to someone else like you wished he would listen to you
  2979. -- Anonymous
  2980. @ENDNODE
  2981. @NODE "Mail_111" " Re: Begginners-question regarding memory allocation "
  2982. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  2983. Date: 01-28-00 23:27:21
  2984. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  2985. From: Andrew Bell <andrew.ab2000@bigfoot.com>
  2986. Hi Stephan,
  2987. On 28-Jan-00 you wrote: [amiga-c] Begginners-question regarding memory
  2988. allocation
  2989. > Hello experts :),
  2990. > upto now I only used Blitzbasic and arexx for programming purposes.
  2991. > So memory allocation is something I didn't have to use. And that's
  2992. > my first question: Is it absolutely necessary to use memory
  2993. > allocation, for example if I want to make a database. I see the
  2994. > advantage that I can allocate the memory dynamically, but what other
  2995. > advantages are there? Wouldn't it be enough the do a structure of a
  2996. > database an array/pointers of it?
  2997. Arrays are fine for storing data records, but you'll eventually find
  2998. yourself running out of entries because array are always fixed in
  2999. length. You could get around this by defining a very large array, but
  3000. you'll end up eating lots of memory.
  3001. > And, how do I have to do the memory allocation? I mean, If I have an
  3002. > array, getting the different fields is clear, but if I allocate
  3003. > memory each time new data is entered, I also have to have a name for
  3004. > the allocated memory-part. But how can I have a different name each
  3005. > time and also can do it with a general function? Wouldn't I have to
  3006. > have some kind of array again?
  3007. Say for example your database program needs to store 5000 records,
  3008. what you could do is define an array with 5000 pointers. Each pointer
  3009. in this array will point to your record structure, which you can
  3010. dynamically allocate with malloc() or the Amiga's
  3011. AllocMem()/AllocVec() functions. An unused record slot in this array
  3012. could be represented with a NULL. So when you add a record to your
  3013. database, you'll have a loop which scans the whole array until it
  3014. encounters a NULL, if it doesn't you'll know you're out of record
  3015. slots. If it does, you can allocate your record structure, fill it
  3016. in, and place the pointer to that record in your array, where you
  3017. found the NULL. Of course, don't forget to free your records before
  3018. your program quits.
  3019. This is a very simply way of handling a database of records, but is
  3020. limited to 5000 record slots.
  3021. Another solution would would be to use linked lists, but linked lists
  3022. take more work to setup and are difficult to manage, especially if
  3023. you're just getting to grips with C.
  3024. Basically with a linked list (Amiga style), you have a list header and
  3025. a chain of "nodes". Each node in the chain contains a node structure
  3026. and your record structure. The node structure contains information
  3027. about the node itself plus information on where the next (and
  3028. previous) node is located in memory.
  3029. exec.library provides functions for manipulating linked lists, but
  3030. you're better of learning how memory allocation works before you
  3031. embark on using them.
  3032. > Sorry, if these are some silly questions, but I am completely lost
  3033. > at the moment... :-/
  3034. Don't worry about it, we all have to start somewhere.
  3035. Regards, Andrew Bell.
  3036. +----------------------------------------+ 
  3037. email: mailto:andrew.ab2000@bigfoot.com or
  3038.        mailto:andrew@ab2000.prestel.co.uk
  3039. web:   http://www2.prestel.co.uk/ab2000
  3040. +----------------------------------------+
  3041. Fear of crowded holiday shopping: Santa Claustrophobia
  3042. @ENDNODE
  3043. @NODE "Mail_112" " Re: Begginners-question regarding memory allocation "
  3044. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  3045. Date: 01-29-00 14:49:13
  3046. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  3047. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  3048. Hello Andrew
  3049. On 28-Jan-00, you wrote:
  3050. > From: Andrew Bell <andrew.ab2000@bigfoot.com>
  3051. > Hi Stephan,
  3052. > On 28-Jan-00 you wrote: [amiga-c] Begginners-question regarding memory
  3053. > allocation
  3054. >> Hello experts :),
  3055. >> upto now I only used Blitzbasic and arexx for programming purposes.
  3056. >> So memory allocation is something I didn't have to use. And that's
  3057. >> my first question: Is it absolutely necessary to use memory
  3058. >> allocation, for example if I want to make a database. I see the
  3059. >> advantage that I can allocate the memory dynamically, but what other
  3060. >> advantages are there? Wouldn't it be enough the do a structure of a
  3061. >> database an array/pointers of it?
  3062. > Arrays are fine for storing data records, but you'll eventually find
  3063. > yourself running out of entries because array are always fixed in
  3064. > length. You could get around this by defining a very large array, but
  3065. > you'll end up eating lots of memory.
  3066. >> And, how do I have to do the memory allocation? I mean, If I have an
  3067. >> array, getting the different fields is clear, but if I allocate
  3068. >> memory each time new data is entered, I also have to have a name for
  3069. >> the allocated memory-part. But how can I have a different name each
  3070. >> time and also can do it with a general function? Wouldn't I have to
  3071. >> have some kind of array again?
  3072. > Say for example your database program needs to store 5000 records,
  3073. > what you could do is define an array with 5000 pointers. Each pointer
  3074. > in this array will point to your record structure, which you can
  3075. > dynamically allocate with malloc() or the Amiga's
  3076. > AllocMem()/AllocVec() functions. An unused record slot in this array
  3077. > could be represented with a NULL. So when you add a record to your
  3078. > database, you'll have a loop which scans the whole array until it
  3079. > encounters a NULL, if it doesn't you'll know you're out of record
  3080. > slots. If it does, you can allocate your record structure, fill it
  3081. > in, and place the pointer to that record in your array, where you
  3082. > found the NULL. Of course, don't forget to free your records before
  3083. > your program quits.
  3084. > This is a very simply way of handling a database of records, but is
  3085. > limited to 5000 record slots.
  3086. > Another solution would would be to use linked lists, but linked lists
  3087. > take more work to setup and are difficult to manage, especially if
  3088. > you're just getting to grips with C.
  3089. > Basically with a linked list (Amiga style), you have a list header and
  3090. > a chain of "nodes". Each node in the chain contains a node structure
  3091. > and your record structure. The node structure contains information
  3092. > about the node itself plus information on where the next (and
  3093. > previous) node is located in memory.
  3094. > exec.library provides functions for manipulating linked lists, but
  3095. > you're better of learning how memory allocation works before you
  3096. > embark on using them.
  3097. >> Sorry, if these are some silly questions, but I am completely lost
  3098. >> at the moment... :-/
  3099. Heres an example on using amiga linked lists i found, it might be useful.
  3100. > Don't worry about it, we all have to start somewhere.
  3101. > Regards, Andrew Bell.
  3102. Regards
  3103. @ENDNODE
  3104. @NODE "Mail_113" " Re: Begginners-question regarding memory allocation (+attachments) "
  3105. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  3106. Date: 01-29-00 20:14:47
  3107. Subject: @{b}Re: Begginners-question regarding memory allocation (+attachments)@{ub}
  3108. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  3109. Hello Stephan,
  3110. You've already received a few replies to this message, but I had started coding already. So I thought what the hell, a few more examples and ideas wouldn't hurt. :)
  3111. BTW, all the examples were written in portable ANSI-C (I was away from home at the time).
  3112. > And, how do I have to do the memory allocation?
  3113. The files example1.c and example2.c show you how with descriptive comments.
  3114. > Wouldn't I have to have some kind of array again?
  3115. The files main.c, database.c and database.h demonstrate a *very* simple database using an array of pointers. The front-end to the program is a bit grotty, but it was only ment to be a quick example. The array of pointers is automatically resized when required. One advantage of implementing a database like this is fast sort times you can achieve, because only pointers are moved, not database records.
  3116. Just an idea for you (I don't know if it's any good);
  3117. An array of pointers does not consume very much memory. It would therefore be possible to have several arrays. Each one for referencing the database sorted on different keys.
  3118. Finally, I appologise for any errors (design and implementation) in the source!
  3119. Kind Regards
  3120. Nathan
  3121. @ENDNODE
  3122. @NODE "Mail_114" " Re: Re: Begginners-question regarding memory allocation (+attachments "
  3123. From: Duane McDonnell <dmcdonnell@primus.com.au>
  3124. Date: 01-29-00 20:55:56
  3125. Subject: @{b}Re: Re: Begginners-question regarding memory allocation (+attachments@{ub}
  3126. From: Duane McDonnell <dmcdonnell@primus.com.au>
  3127. >From: "Nathan J. Young" <nathan.young@bigfoot.com>
  3128. >Hello Stephan,
  3129. >You've already received a few replies to this message, but I had started
  3130. >coding already. So I thought what the hell, a few more examples and ideas
  3131. >wouldn't hurt. :)
  3132. >BTW, all the examples were written in portable ANSI-C (I was away from home
  3133. >the time).
  3134. Wow, a lot of effort clearly went into that. Nice job! :-)
  3135. The only comment I'd like to add (which I'm sure you know, I'm
  3136. pointing this out for the benefit of Stephan) is that on the Amiga
  3137. you should really stick with standard Exec lists and nodes rather
  3138. than use custom lists or arrays. You often need to display lists
  3139. in listview gadgets, but this requires standard Exec lists
  3140. (of course, you can write a converter for this if required,
  3141. but then things start to get messy).
  3142. @ENDNODE
  3143. @NODE "Mail_115" " Pattern dither in Adobe Photoshop, how and what? "
  3144. From: "Alastair M. Robinson" <blackfive@fakenhamweb.co.uk>
  3145. Date: 01-29-00 22:22:53
  3146. Subject: @{b}Pattern dither in Adobe Photoshop, how and what?@{ub}
  3147. From: "Alastair M. Robinson" <blackfive@fakenhamweb.co.uk>
  3148. Hi Allan,
  3149. >  A friend of mine told me that Adobe Photoshop had a dither setting called
  3150. >  'pattern' and that this gave rather good results -- does anybody know the
  3151. >  technique behind this? I don't have PS (nor a PC) so I can't test it myself,
  3152. >  and I didn't find anything useful when using Google to search the net...
  3153. I've not used PhotoShop myself, but I seem to remember reading (and it has
  3154. been known for my memory to play tricks on me!) that Adobe hold a patent
  3155. on one of PhotoShop's dither methods.  The term 'pattern dither' rings a
  3156. bell, so it could well have been this one.
  3157. Is this query just out of interest, or do you need a dither method
  3158. yourself?  If so, I might be able to help out.
  3159. All the best,
  3160. Alastair M. Robinson, email:blackfive@fakenhamweb.co.uk
  3161. Amiga 4000/030, 18Meg RAM, 4.3Gig HD, Mustek ScanExpress 6000SP
  3162. C, Assembler (68k, PIC16C84, learning ATMEL AVR), PostScript,
  3163. ARexx, AMOSPro(!), AmigaDOS
  3164. A committee is a group that keeps minutes and loses hours.
  3165. @ENDNODE
  3166. @NODE "Mail_116" " Re: Begginners-question regarding memory allocation (+attachments) "
  3167. From: Stephan Huebner <StephanHuebner@swol.de>
  3168. Date: 01-30-00 01:54:45
  3169. Subject: @{b}Re: Begginners-question regarding memory allocation (+attachments)@{ub}
  3170. From: Stephan Huebner <StephanHuebner@swol.de>
  3171. Hello Nathan
  3172. On 29-Jan-00, you wrote:
  3173. > You've already received a few replies to this message, but I had started
  3174. > coding already. So I thought what the hell, a few more examples and ideas
  3175. > wouldn't hurt. :)
  3176. No problem! :) The more examples I have the better it is.
  3177. > BTW, all the examples were written in portable ANSI-C (I was away from
  3178. > home at the time).
  3179. That's nice, but I think I should be using Amiga-functions to avoid
  3180. problems.
  3181. >> And, how do I have to do the memory allocation?
  3182. > The files example1.c and example2.c show you how with descriptive
  3183. > comments.
  3184. Great! You had a lot of time to write all those comments, didn't you? ;-)
  3185. > The files main.c, database.c and database.h demonstrate a *very* simple
  3186. > database using an array of pointers. The front-end to the program is a bit
  3187. > grotty, but it was only ment to be a quick example. The array of pointers
  3188. > is automatically resized when required. One advantage of implementing a
  3189. > database like this is fast sort times you can achieve, because only
  3190. > pointers are moved, not database records.
  3191. Cool, another interesting method. But I think the linked-lists method is the
  3192. best one.
  3193. > Just an idea for you (I don't know if it's any good);
  3194. Let's see. Even if I don't use it, it's good to see how things can be done.
  3195. > An array of pointers does not consume very much memory. It would therefore
  3196. > be possible to have several arrays. Each one for referencing the database
  3197. > sorted on different keys.
  3198. But even if it is only a small amount of memory it shouldn't be necessary,
  3199. so I think I'll try the linked-list method.
  3200. Greetings,
  3201. Stephan
  3202. Elephant: An animal which because of his colour can easily be mixed up with
  3203. a mouse
  3204. -- Anonymous
  3205. @ENDNODE
  3206. @NODE "Mail_117" " Re: Begginners-question regarding memory allocation "
  3207. From: Stephan Huebner <StephanHuebner@swol.de>
  3208. Date: 01-30-00 02:05:04
  3209. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  3210. From: Stephan Huebner <StephanHuebner@swol.de>
  3211. Hello Andrew
  3212. On 28-Jan-00, you wrote:
  3213. > Arrays are fine for storing data records, but you'll eventually find
  3214. > yourself running out of entries because array are always fixed in
  3215. > length. You could get around this by defining a very large array, but
  3216. > you'll end up eating lots of memory.
  3217. Yeah, that's the problem I saw. Therefore I was looking for a better method
  3218. > Say for example your database program needs to store 5000 records,
  3219. > what you could do is define an array with 5000 pointers.
  3220. [snip]
  3221. > This is a very simply way of handling a database of records, but is
  3222. > limited to 5000 record slots.
  3223. And I would have to define an array again. And so I would loose the
  3224. possibility of dynamically adding records if more than 5000 would be
  3225. needed.
  3226. > Another solution would would be to use linked lists, but linked lists
  3227. > take more work to setup and are difficult to manage, especially if
  3228. > you're just getting to grips with C.
  3229. I'm trying out small things in ansi-c for quite a while now, so I think I
  3230. will know how to do eat from the examples, some of the friendly guys out
  3231. here sent me.
  3232. > Basically with a linked list (Amiga style), you have a list header and
  3233. > a chain of "nodes". Each node in the chain contains a node structure
  3234. > and your record structure. The node structure contains information
  3235. > about the node itself plus information on where the next (and
  3236. > previous) node is located in memory.
  3237. Seems like the gadgets-structure (or was it the requester-structure?) with
  3238. references to the next and previous gadgets. I remember reading about it in
  3239. the RKM.
  3240. > exec.library provides functions for manipulating linked lists, but
  3241. > you're better of learning how memory allocation works before you
  3242. > embark on using them.
  3243. BTW: What's the best autodoc-viewer? Maybe with converting them to
  3244. AmigaGuide? Would help me much to find infos faster.
  3245. Greetings,
  3246. Stephan
  3247. Freedom: A nice thing, but not if it's been bought with lonelyness
  3248. -- Bertrand Russel
  3249. @ENDNODE
  3250. @NODE "Mail_118" " Re: Begginners-question regarding memory allocation (+attachments) "
  3251. From: Allan Odgaard <Duff@DIKU.DK>
  3252. Date: 01-30-00 10:01:50
  3253. Subject: @{b}Re: Begginners-question regarding memory allocation (+attachments)@{ub}
  3254. From: Allan Odgaard <Duff@DIKU.DK>
  3255. On 29-Jan-00, Nathan J. Young wrote:
  3256. > You've already received a few replies to this message, but I had started
  3257. > coding already. So I thought what the hell, a few more examples and ideas
  3258. > wouldn't hurt. :)
  3259. Please compress attachments when they exceed a few kilobytes!
  3260. Regards Allan
  3261.      URL: http://www.DIKU.dk/students/duff/
  3262. Success is like a fart - only your own smells nice.
  3263. -- James P. Hogan
  3264. @ENDNODE
  3265. @NODE "Mail_119" " Re: Begginners-question regarding memory allocation "
  3266. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  3267. Date: 01-30-00 12:23:43
  3268. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  3269. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  3270. Hello Stephan
  3271. On 30-Jan-00, you wrote:
  3272. > From: Stephan Huebner <StephanHuebner@swol.de>
  3273. > Hello Andrew
  3274. > On 28-Jan-00, you wrote:
  3275. >> Arrays are fine for storing data records, but you'll eventually find
  3276. >> yourself running out of entries because array are always fixed in
  3277. >> length. You could get around this by defining a very large array, but
  3278. >> you'll end up eating lots of memory.
  3279. > Yeah, that's the problem I saw. Therefore I was looking for a better
  3280. > method :)
  3281. >> Say for example your database program needs to store 5000 records,
  3282. >> what you could do is define an array with 5000 pointers.
  3283. > [snip]
  3284. >> This is a very simply way of handling a database of records, but is
  3285. >> limited to 5000 record slots.
  3286. > And I would have to define an array again. And so I would loose the
  3287. > possibility of dynamically adding records if more than 5000 would be
  3288. > needed.
  3289. >> Another solution would would be to use linked lists, but linked lists
  3290. >> take more work to setup and are difficult to manage, especially if
  3291. >> you're just getting to grips with C.
  3292. > I'm trying out small things in ansi-c for quite a while now, so I think I
  3293. > will know how to do eat from the examples, some of the friendly guys out
  3294. > here sent me.
  3295. >> Basically with a linked list (Amiga style), you have a list header and
  3296. >> a chain of "nodes". Each node in the chain contains a node structure
  3297. >> and your record structure. The node structure contains information
  3298. >> about the node itself plus information on where the next (and
  3299. >> previous) node is located in memory.
  3300. > Seems like the gadgets-structure (or was it the requester-structure?) with
  3301. > references to the next and previous gadgets. I remember reading about it
  3302. > in the RKM.
  3303. >> exec.library provides functions for manipulating linked lists, but
  3304. >> you're better of learning how memory allocation works before you
  3305. >> embark on using them.
  3306. > BTW: What's the best autodoc-viewer? Maybe with converting them to
  3307. > AmigaGuide? Would help me much to find infos faster.
  3308. Get ADocReader from Aminet. I thinks its very good. well it does the job.
  3309. > Greetings,
  3310. > Stephan
  3311. Regards
  3312. @ENDNODE
  3313. @NODE "Mail_120" " Mui future. "
  3314. From: Vincent Morenas <vincent.morenas@wanadoo.fr>
  3315. Date: 01-30-00 13:11:04
  3316. Subject: @{b}Mui future.@{ub}
  3317. From: Vincent Morenas <vincent.morenas@wanadoo.fr>
  3318. Hello,
  3319.   Does someone could tell me if the author of MUI plan to produce a 3.9 or
  3320. 4.0 Version ??
  3321. Kind regards
  3322. Vincent MORENAS.
  3323. @ENDNODE
  3324. @NODE "Mail_121" " Re: Begginners-question regarding memory allocation "
  3325. From: Christian Hattemer <Chris@heaven.riednet.wh.tu-darmstadt.de>
  3326. Date: 01-30-00 18:19:18
  3327. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  3328. From: Christian Hattemer <Chris@heaven.riednet.wh.tu-darmstadt.de>
  3329. On 28-Jan-00 Charles Barr wrote:
  3330. >> Each time you add a record you allocate memory for the size of one
  3331. >> record. You'll get a new memory area each time you do that, at least
  3332. >> until the memory ist full... Of course you need to track where your
  3333. >> records are in memory, to be able to access and free them on exit of your
  3334. >> program.
  3335. > Dont be using arrays anyway, Use Amiga List structures, It is then easier
  3336. > to keep track of allocated memory areas, and then free them.
  3337. This is what I had in mind when writing the mail. I didn't mention it
  3338. because I was in a hurry and didn't want to write too much confusing stuff
  3339. in the first reply...
  3340. I've got some code to offer which handles ASCII config files using exec
  3341. lists. Should be enough as an lists example, although the latest version is
  3342. currently unreleased.
  3343. It's available as part of the ML-Support source on Aminet, look at Config.c
  3344. and Config.h.
  3345. Bye, Chris
  3346.             __
  3347.            ///
  3348.       __  ///  Amiga 4000T 040/40      Team *AMIGA*
  3349.       \\\///
  3350.        \XX/    http://www.riednet.wh.tu-darmstadt.de/~chris/
  3351. Error #0190: Please remove Cat from Drive.
  3352. @ENDNODE
  3353. @NODE "Mail_122" " Re: Begginners-question regarding memory allocation "
  3354. From: Jack York <jyork@voyager.net>
  3355. Date: 01-30-00 19:45:44
  3356. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  3357. From: Jack York <jyork@voyager.net>
  3358. Hello Stephan
  3359. On 29-Jan-00, Stephan Huebner wrote:
  3360. > From: Stephan Huebner <StephanHuebner@swol.de>
  3361. > Hello Andrew
  3362. > On 28-Jan-00, you wrote:
  3363. >> Arrays are fine for storing data records, but you'll eventually find
  3364. >> yourself running out of entries because array are always fixed in
  3365. >> length. You could get around this by defining a very large array, but
  3366. >> you'll end up eating lots of memory.
  3367. > Yeah, that's the problem I saw. Therefore I was looking for a better
  3368. > method :)
  3369. > And I would have to define an array again. And so I would loose the
  3370. > possibility of dynamically adding records if more than 5000 would be
  3371. > needed.
  3372. Arrays can be dynamically allocated and resized as needed without losing
  3373. data.    And the entries can be accessed much faster than with lists,
  3374. barring
  3375. the use of hash tables and the like.  
  3376. @ENDNODE
  3377. @NODE "Mail_123" " Re: Begginners-question regarding memory allocation (+attachments) "
  3378. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  3379. Date: 01-30-00 21:20:19
  3380. Subject: @{b}Re: Begginners-question regarding memory allocation (+attachments)@{ub}
  3381. From: "Nathan J. Young" <nathan.young@bigfoot.com>
  3382. Hi Stephan,
  3383. >> BTW, all the examples were written in portable ANSI-C (I was away from
  3384. >> home at the time).
  3385. > That's nice, but I think I should be using Amiga-functions to avoid
  3386. > problems.
  3387. Problems? There should be no *real* problems - he says. :)
  3388. If your database is to be an Amiga specific application then fine. But what are you going to do if you 
  3389. decide to support both AmigaOS and Neurtino or what-ever?
  3390. >>> And, how do I have to do the memory allocation?
  3391. >> The files example1.c and example2.c show you how with descriptive
  3392. >> comments.
  3393. > Great! You had a lot of time to write all those comments, didn't you? ;-)
  3394. I typed quickly. :)
  3395. >> The files main.c, database.c and database.h demonstrate a *very* simple
  3396. >> database using an array of pointers. The front-end to the program is a bit
  3397. >> grotty, but it was only ment to be a quick example. The array of pointers
  3398. >> is automatically resized when required. One advantage of implementing a
  3399. >> database like this is fast sort times you can achieve, because only
  3400. >> pointers are moved, not database records.
  3401. > Cool, another interesting method. But I think the linked-lists method is the
  3402. > best one.
  3403. Think about sorting and searching. These could become you're two biggest performance killers. Perhaps these suggestions might help you;
  3404. 1) When sorting your list, move the pointers instead of the actual nodes.
  3405. 2) Use a doubly-linked list to traverse the database in either direction.
  3406. 3) Insert items in to your list in sorted order. This will make it un-necessary to sort the list unless you need to change the sort critera.
  3407. 4) Implement a binary search to find entries in your sorted list - instead of iterating from head to tail to find an item.
  3408. 5) Oh yeah, have fun!
  3409. >> An array of pointers does not consume very much memory. It would therefore
  3410. >> be possible to have several arrays. Each one for referencing the database
  3411. >> sorted on different keys.
  3412. > But even if it is only a small amount of memory it shouldn't be necessary,
  3413. > so I think I'll try the linked-list method.
  3414. It's not necessary! It was just an idea to improve the sorting speed of your database. Especially if you are going to do sorts on different fields often.
  3415. Kind Regards
  3416. Nathan
  3417. @ENDNODE
  3418. @NODE "Mail_124" " Re: Begginners-question regarding memory allocation "
  3419. From: Ilkka Lehtoranta <iti@solutions.fi>
  3420. Date: 01-31-00 00:28:13
  3421. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  3422. From: Ilkka Lehtoranta <iti@solutions.fi>
  3423. Hello Stephan
  3424. On 30-Tam-00, you wrote:
  3425. SH> BTW: What's the best autodoc-viewer? Maybe with converting them to
  3426. SH> AmigaGuide? Would help me much to find infos faster.
  3427. Get Amiga Developer CD...
  3428. There you can find includes & autodocs in AmigaGuide format.
  3429. And lots of other developer material :)
  3430. @ENDNODE
  3431. @NODE "Mail_125" " Re: Mui future. "
  3432. From: Ilkka Lehtoranta <iti@solutions.fi>
  3433. Date: 01-31-00 00:51:11
  3434. Subject: @{b}Re: Mui future.@{ub}
  3435. From: Ilkka Lehtoranta <iti@solutions.fi>
  3436. Hello Vincent
  3437. On 30-Tam-00, you wrote:
  3438. VM> From: Vincent Morenas <vincent.morenas@wanadoo.fr>
  3439. VM> Hello,
  3440. VM>  Does someone could tell me if the author of MUI plan to produce a 3.9
  3441. VM> or 4.0 Version ??
  3442. AFAIK Stuntz is still developing MUI. But don't ask when 3.9 or 4.0 is
  3443. out: no one knows.
  3444. @ENDNODE
  3445. @NODE "Mail_126" " Re: Begginners-question regarding memory allocation "
  3446. From: roderick_maclean@agilent.com
  3447. Date: 01-31-00 10:45:45
  3448. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  3449. From: roderick_maclean@agilent.com
  3450. > Yeah, but I think I will need some kind of "identifier" for each
  3451. > piece of memory.But Tim Hanson has kindly written some code-lines,
  3452. > will have a deeper look on that and see if it solves the problem...
  3453. What happens internally is that each name you declare hooks up with
  3454. a variable address. Your pointer variables will point to the data you
  3455. want to store.
  3456. If you want to set up a linked list then the linked list structure
  3457. will contain the data variables AND a pointer to the same type of
  3458. linked list structure.
  3459. This way you can chain your data together into a continuous 'list'.
  3460. You can step through the list one item at a time to look for the
  3461. data that you want.
  3462. As far as pointer variables are concerned, you only need to worry
  3463. about the address of the first item in the list and the address of
  3464. the 'current' item in the list. So at a minimum you really only
  3465. need two pointer variables. You might need 3 (or maybe 4) depending
  3466. upon what you do with the list but these will probably just be
  3467. temporary.
  3468. If you're writing a database program, I really would suggest really
  3469. learning pointer/memory stuff. Eventually you're going to want to
  3470. store that data in some other structure (maybe a tree?) (or worse,
  3471. you might need to reference the same data from a variety of
  3472. different structures)
  3473. Good luck! I hope some of this made sense!
  3474. Rod MacLean                      | Roderick_MacLean@agilent.com
  3475. Developer - Agilent Technologies | +44 (0131) 331-7304
  3476. ** My views do not necessarily reflect the views of Agilent! **
  3477. @ENDNODE
  3478. @NODE "Mail_127" " Re: Begginners-question regarding memory allocation "
  3479. From: roderick_maclean@agilent.com
  3480. Date: 01-31-00 13:20:14
  3481. Subject: @{b}Re: Begginners-question regarding memory allocation@{ub}
  3482. From: roderick_maclean@agilent.com
  3483. Nathan wrote:
  3484. > Think about sorting and searching. These could become you're 
  3485. > two biggest performance killers. Perhaps these suggestions 
  3486. > might help you;
  3487. > 1) When sorting your list, move the pointers instead of the 
  3488. > actual nodes.
  3489. You can if you like... I would store the data in a structure
  3490. similar to the Exec lists. You'll probably want to make the
  3491. structure a two-way linked list. (You might even want to create
  3492. a b-tree).
  3493. I would leave the list alone during sorts and searches and instead
  3494. I would create a copy of the list which contained only the elements
  3495. which I was searching for.
  3496. > 3) Insert items in to your list in sorted order. This will 
  3497. > make it un-necessary to sort the list unless you need to 
  3498. > change the sort critera.
  3499. Good advice! Having your list pre-sorted into some kind of
  3500. order is usually very important.
  3501. For example DB of telephone numbers: pre-sort by surname.
  3502. You can extract names easily (or at least find roughly the
  3503. right place :)
  3504. If you need to sort by area-code (or something) then one
  3505. way to do it is to step through your original doubly-linked
  3506. list, adding things a secondary dl-list in area order...
  3507. Once you are finished manipulating the new list then zap all
  3508. of the pointers - but make sure that your original list and the
  3509. data are all intact/valid!
  3510. > 4) Implement a binary search to find entries in your sorted 
  3511. > list - instead of iterating from head to tail to find an item.
  3512. If you're looking for just one entry then you can do this. It's
  3513. easy and you'll probably already know the algorithm ;)
  3514. If you're looking for more than one entry then you can use this
  3515. method to find one data item that fits your query. You have to
  3516. expand on the algorithm in some way to get more than one hit.
  3517. If you find that you need to do that kind of thing you should
  3518. maybe consider using an existing db that you can interact
  3519. with from within your program. (Using SQL or something?)
  3520. It might save you as lot of coding time. (but I don't know
  3521. how good SQL dbs and stuff are on the Amiga)
  3522. > 5) Oh yeah, have fun!
  3523. Anyone who gets into serious pointer stuff always has fun.
  3524. You know the old saying "Time flies when you're having fun"
  3525. It takes a long time to track down bugs ;)
  3526. Rod MacLean                      | Roderick_MacLean@agilent.com
  3527. Developer - Agilent Technologies | +44 (0131) 331-7304
  3528. ** My views do not necessarily reflect the views of Agilent! **
  3529. @ENDNODE
  3530. @NODE "Mail_128" " "explode" image "
  3531. From: andrewmarkwell@ukonline.co.uk
  3532. Date: 01-31-00 15:43:56
  3533. Subject: @{b}"explode" image@{ub}
  3534. From: andrewmarkwell@ukonline.co.uk
  3535. Hiya,
  3536. I have a window with a gadget in that brings up as ASL requester when you click on it.  I was wondering if the image used in Intellifont (where you click on it to choose the location of fonts), was considered a standard for this kind of thing.  I can't find any reference to it in the includes.  If not, then what is a good thing to use?  Maybe "..." like Windows?
  3537. Andrew Markwell
  3538. @ENDNODE
  3539. @NODE "Mail_129" " Geek gadgets CD "
  3540. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  3541. Date: 01-31-00 17:26:14
  3542. Subject: @{b}Geek gadgets CD@{ub}
  3543. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  3544. Hello,
  3545.      Does anyone know of any companies that sell the geek gadgets CD.
  3546. I just found out the weird science have stopped selling the CD.
  3547. Or has anyone got a copy they might sell to me?
  3548. Cheers
  3549. @ENDNODE
  3550. @NODE "Mail_130" " Telling when printing is stopped. "
  3551. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  3552. Date: 01-31-00 17:29:53
  3553. Subject: @{b}Telling when printing is stopped.@{ub}
  3554. From: Charles Barr <charlie@amigaforever.free-online.co.uk>
  3555. Hello,
  3556.      Is there any way of telling when the printer is stopped printing a
  3557. file.
  3558. what i do is send one text file to the PRT: 
  3559. I need some way of telling when the first file is finished.
  3560. to  send another one.
  3561. Cheers
  3562. @ENDNODE
  3563. @NODE "Mail_131" " AW: Geek gadgets CD "
  3564. From: Fritsch Alexander <Alexander.Fritsch@icn.siemens.de>
  3565. Date: 01-31-00 17:32:26
  3566. Subject: @{b}AW: Geek gadgets CD@{ub}
  3567. From: Fritsch Alexander <Alexander.Fritsch@icn.siemens.de>
  3568. > Hello,
  3569. >      Does anyone know of any companies that sell the geek gadgets CD.
  3570. > I just found out the weird science have stopped selling the CD.
  3571. > Or has anyone got a copy they might sell to me?
  3572. > Cheers
  3573. > -- 
  3574.     Did you try  http://www.schatztruhe.de/inhalt.html  ? 
  3575.     The GG-CDs are still listed there. 
  3576.     Kind regards Alexander Fritsch  
  3577. @ENDNODE
  3578. @NODE "Mail_132" " Odp: Pattern dither in Adobe Photoshop, how and what? "
  3579. From: Michal Bartczak <mikerro@ihh.pi.com.pl>
  3580. Date: 01-31-00 19:08:25
  3581. Subject: @{b}Odp: Pattern dither in Adobe Photoshop, how and what?@{ub}
  3582. From: "Michal Bartczak" <mikerro@ihh.pi.com.pl>
  3583. >  A friend of mine told me that Adobe Photoshop had a dither setting called
  3584. >  'pattern' and that this gave rather good results -- does anybody know the
  3585. >  technique behind this? I don't have PS (nor a PC) so I can't test it
  3586. myself,
  3587. >  and I didn't find anything useful when using Google to search the net...
  3588. I know some dither routines, even some patented ones, and I'm not using
  3589. APhotoshop, but pattern dither sounds like normal ordered dither for me ;)
  3590. [or it can be modified ordered dither]. Anyway, best result for 256 colors
  3591. are given by floyd&steinberg and similiar routines, if you need to know
  3592. how - contact me, I'm quite experienced in this area.
  3593. Michal
  3594. @ENDNODE
  3595. @NODE "Mail_133" " Hello there! I'm new here! ;
  3596. From: fgloch@yahoo.com
  3597. Date: 01-31-00 19:17:13
  3598. Subject: @{b}Hello there! I'm new here! ;
  3599. )@{ub}
  3600. From: fgloch@yahoo.com
  3601. Hi there,
  3602. I've just joined this list and I am just saying my hellos to you all.
  3603. Kinds regards,
  3604. Francis.
  3605. @ENDNODE
  3606. @NODE "Mail_134" " Bobs and GELS "
  3607. From: Lee Atkins <lee@loonyjuicesoftware.freeserve.co.uk>
  3608. Date: 01-31-00 20:27:36
  3609. Subject: @{b}Bobs and GELS@{ub}
  3610. From: Lee Atkins <lee@loonyjuicesoftware.freeserve.co.uk>
  3611. Hello,
  3612. Imagine, if you will, a vertical wall on the right hand side of the screen. 
  3613. On the left is a Bob created and managed by the Gels system.  When the bob
  3614. is standing next to the wall after traveling from the right, the wall must
  3615. change.  I have done this by blitting the new gfx over the old wall image
  3616. (the screen is double buffered and all gfx operations go to the hidden
  3617. bitmap)
  3618. The problem is the bob overlaps the wall and when the bob moves, the OS
  3619. updates the bitmap from the buffer it stored previous to me blitting in new
  3620. gfx.  Is there a way of removing the Bob image, blitting the new stuff, then
  3621. moving the bob.
  3622. Also is the Gels system the best way to handle Bobs or is there a better
  3623. Hope that made sense.
  3624. @ENDNODE
  3625. @NODE "Mail_135" " Re: Pattern dither in Adobe Photoshop, how and what? "
  3626. From: Allan Odgaard <Duff@DIKU.DK>
  3627. Date: 01-31-00 20:33:13
  3628. Subject: @{b}Re: Pattern dither in Adobe Photoshop, how and what?@{ub}
  3629. From: Allan Odgaard <Duff@DIKU.DK>
  3630. On 29-Jan-00, Alastair M. Robinson wrote:
  3631. >> A friend of mine told me that Adobe Photoshop had a dither setting called
  3632. >> 'pattern' and that this gave rather good results [...]
  3633. > I've not used PhotoShop myself, but I seem to remember reading (and it has
  3634. > been known for my memory to play tricks on me!) that Adobe hold a patent
  3635. > on one of PhotoShop's dither methods.  The term 'pattern dither' rings a
  3636. > bell, so it could well have been this one.
  3637. Did the article mention their technique? I believe that if they have a patent
  3638. then they must have published the method in one way or another...
  3639. > Is this query just out of interest, or do you need a dither method
  3640. > yourself?  If so, I might be able to help out.
  3641. I'm author of ImageManager.library which currently offers random, ordered and
  3642. FS dither, but I'm always interested in new schemes if they're any good :-)
  3643. Regards Allan
  3644.      URL: http://www.DIKU.dk/students/duff/
  3645. Win95: "We made it safe to turn off your computer"
  3646. @ENDNODE
  3647. @NODE "Mail_136" " Re: "explode" image "
  3648. From: Duane McDonnell <dmcdonnell@primus.com.au>
  3649. Date: 01-31-00 21:29:45
  3650. Subject: @{b}Re: "explode" image@{ub}
  3651. From: Duane McDonnell <dmcdonnell@primus.com.au>
  3652. >From: andrewmarkwell@ukonline.co.uk
  3653. >Hiya,
  3654. >I have a window with a gadget in that brings up as ASL requester when you
  3655. >click on it.  I was wondering if the image used in Intellifont (where you
  3656. >click on it to choose the location of fonts), was considered a standard for
  3657. >this kind of thing.
  3658. There is no standard support for this gadget type in Intuition,
  3659. so the standard is whatever you define it to be :-)  However,
  3660. that type of image is quite common; many of the GUI builders
  3661. include it or something like it for use. If you prefer to make
  3662. your own you can use BOOPSI or even low level Intuition gadgets
  3663. with the appropriate imagery rendered as you like.
  3664. >  I can't find any reference to it in the includes.  If
  3665. >not, then what is a good thing to use?  Maybe "..." like Windows?
  3666. I don't suppose it matters, as long as you're consistent.
  3667. You could use a capital "F" or even ">>" or something like that.
  3668. Maybe the Style Guide has something to say about this, but I
  3669. don't have a copy handy.
  3670. @ENDNODE
  3671.